fix.убрал из общей(в перспективе библиотечной) части ссылки на частные объекты визуализатора
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Visual.Menus.StyledPopupMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.MouseEvent;
|
||||
public class GraphMenu<T extends StyledTree> extends StyledPopupMenu {
|
||||
public T tree;
|
||||
public GraphMenu(T tree_in, String branches_name) {
|
||||
tree = tree_in;
|
||||
JMenuItem m = null;
|
||||
m = new VisualiserMenuItem("Свернуть все " + branches_name);
|
||||
m.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tree.CollapseAll();
|
||||
}
|
||||
});
|
||||
add(m);
|
||||
m = new VisualiserMenuItem("Развернуть все " + branches_name);
|
||||
m.addActionListener(new AbstractAction() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
tree.ExpandAll();
|
||||
}
|
||||
});
|
||||
add(m);
|
||||
}
|
||||
public GraphMenu(T tree) {
|
||||
this(tree, tree.getBranchesName());
|
||||
}
|
||||
public void Show(MouseEvent mouseEvent) {
|
||||
show(tree, mouseEvent.getX(), mouseEvent.getY());
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.StyledTree;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Selectable;
|
||||
import Common.Visual.Trees.DataTree;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package _VisualDVM.Visual.Menus;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Controls.StableMenuItem;
|
||||
import Common.Visual.Menus.GraphMenu;
|
||||
import Common.Visual.Menus.VisualiserMenuItem;
|
||||
import Common.Visual.Trees.DataTree;
|
||||
import _VisualDVM.Global;
|
||||
|
||||
28
src/_VisualDVM/Visual/Trees/GraphTreeCellRenderer.java
Normal file
28
src/_VisualDVM/Visual/Trees/GraphTreeCellRenderer.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package _VisualDVM.Visual.Trees;
|
||||
import Common.MainModule_;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Visual.Trees.StyledTreeCellRenderer;
|
||||
import _VisualDVM.ProjectData.SapforData.FileObjectWithMessages;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
public class GraphTreeCellRenderer extends StyledTreeCellRenderer {
|
||||
public java.awt.Component getTreeCellRendererComponent(
|
||||
JTree tree, Object value,
|
||||
boolean selected, boolean expanded,
|
||||
boolean leaf, int row, boolean hasFocus) {
|
||||
super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
|
||||
Object o = ((DefaultMutableTreeNode) value).getUserObject();
|
||||
if (o instanceof FileObjectWithMessages) {
|
||||
FileObjectWithMessages target = (FileObjectWithMessages) o;
|
||||
setIcon(Utils_.getIcon(target.ImageKey()));
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(target.getFont()));
|
||||
} else {
|
||||
setIcon(null);
|
||||
setFont(MainModule_.instance.getUI().getTheme().Fonts.get(VisualiserFonts.TreeItalic));
|
||||
}
|
||||
setForeground(tree.getForeground());
|
||||
return this;
|
||||
}
|
||||
}
|
||||
11
src/_VisualDVM/Visual/Windows/FileNameForm.java
Normal file
11
src/_VisualDVM/Visual/Windows/FileNameForm.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.Windows.Dialog.Text.TextFieldDialog;
|
||||
import _VisualDVM.Utils;
|
||||
public class FileNameForm extends TextFieldDialog {
|
||||
public FileNameForm() {
|
||||
}
|
||||
@Override
|
||||
public void validateFields() {
|
||||
Utils.validateFileShortNewName(fields.getText(), Log);
|
||||
}
|
||||
}
|
||||
26
src/_VisualDVM/Visual/Windows/MultilineTextForm.java
Normal file
26
src/_VisualDVM/Visual/Windows/MultilineTextForm.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
import Common.Visual.Windows.Dialog.Text.TextDialog;
|
||||
import _VisualDVM.Visual.Editor.BaseEditor;
|
||||
public class MultilineTextForm extends TextDialog<BaseEditor> {
|
||||
public MultilineTextForm() {
|
||||
super(BaseEditor.class);
|
||||
}
|
||||
//при наследовании по умолчанию поля не присваивать!
|
||||
//инициализация полей работает после конструктора предка!!
|
||||
@Override
|
||||
public void ProcessResult() {
|
||||
Result = fields.getText();
|
||||
}
|
||||
@Override
|
||||
public void InitFields() {
|
||||
fields.setSearchEnabled(false);
|
||||
fields.setLineWrap(true);
|
||||
fields.setWrapStyleWord(true);
|
||||
fields.setHighlightCurrentLine(false);
|
||||
}
|
||||
@Override
|
||||
public void setText(String text_in) {
|
||||
fields.setText(text_in);
|
||||
fields.setCaretPosition(0);
|
||||
}
|
||||
}
|
||||
12
src/_VisualDVM/Visual/Windows/ReadOnlyMultilineTextForm.java
Normal file
12
src/_VisualDVM/Visual/Windows/ReadOnlyMultilineTextForm.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package _VisualDVM.Visual.Windows;
|
||||
public class ReadOnlyMultilineTextForm extends MultilineTextForm {
|
||||
public ReadOnlyMultilineTextForm() {
|
||||
}
|
||||
@Override
|
||||
public void InitFields() {
|
||||
fields.setEditable(false);
|
||||
}
|
||||
@Override
|
||||
public void CreateButtons() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user