рефакторинг контролов таблиц. убрал странный и запутанный старый код
This commit is contained in:
@@ -230,8 +230,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f6da5" binding="loopsGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<grid id="f6da5" binding="loopsGraphPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
@@ -251,8 +250,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="f80d0" binding="functionsGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<grid id="f80d0" binding="functionsGraphPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
@@ -272,8 +270,7 @@
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="1d5e4" binding="arraysGraphPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<grid id="1d5e4" binding="arraysGraphPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
||||
@@ -76,6 +76,11 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
MessageNote.filterValue = "";
|
||||
//-
|
||||
file = file_in;
|
||||
//--
|
||||
loopsForm = new TreeForm(FileLoopsTree.class, loopsGraphPanel);
|
||||
functionsForm = new TreeForm(FileFunctionsTree.class, functionsGraphPanel);
|
||||
arraysForm = new TreeForm(FileArraysTree.class, arraysGraphPanel);
|
||||
//--
|
||||
file.father.db.notes.mountUI(notesPanel);
|
||||
file.father.db.warnings.mountUI(warningsPanel);
|
||||
file.father.db.errors.mountUI(errorsPanel);
|
||||
@@ -332,7 +337,7 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
}
|
||||
@Override
|
||||
public void ShowFirstError() {
|
||||
if (file.father.db.errors.ui_.control.getRowCount() > 0)
|
||||
if (file.father.db.errors.ui_.getRowCount() > 0)
|
||||
file.father.db.errors.ui_.control.SelectRow(0);
|
||||
}
|
||||
@Override
|
||||
@@ -351,12 +356,6 @@ public class FileForm implements FileWindow, FormWithSplitters {
|
||||
public void ShowNoRunOutput() {
|
||||
runOutput.setText("");
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
loopsGraphPanel = (loopsForm = new TreeForm(FileLoopsTree.class)).getContent();
|
||||
functionsGraphPanel = (functionsForm = new TreeForm(FileFunctionsTree.class)).getContent();
|
||||
arraysGraphPanel = (arraysForm = new TreeForm(FileArraysTree.class)).getContent();
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="9d9dc" binding="functionsGraphPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="9d9dc" binding="functionsGraphPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties>
|
||||
<background color="-4144960"/>
|
||||
|
||||
@@ -42,6 +42,7 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
private FunctionsGraphForm functionsGraphForm;
|
||||
public FunctionsForm() {
|
||||
LoadSplitters();
|
||||
functionsGraphForm = new FunctionsGraphForm(functionsGraphPanel);
|
||||
bZoomIn.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@@ -188,7 +189,6 @@ public class FunctionsForm implements FunctionsWindow {
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
functionsGraphPanel = (functionsGraphForm = new FunctionsGraphForm()).getContent();
|
||||
filterName = new StyledTextField();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,13 +102,13 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
filesForm = new TreeForm(FilesTree.class);
|
||||
filesForm = new TreeForm(FilesTree.class, new JPanel(new BorderLayout()));
|
||||
projectDescription = new Viewer();
|
||||
logText = new Viewer();
|
||||
logScroll = new JScrollPane(logText);
|
||||
includesForm = new TreeForm(IncludesTree.class);
|
||||
inlineForm = new TreeForm(InlineTree.class);
|
||||
inlineForm2 = new TreeForm(InlineTree2.class);
|
||||
includesForm = new TreeForm(IncludesTree.class, new JPanel(new BorderLayout()));
|
||||
inlineForm = new TreeForm(InlineTree.class, new JPanel(new BorderLayout()));
|
||||
inlineForm2 = new TreeForm(InlineTree2.class, new JPanel(new BorderLayout()));
|
||||
}
|
||||
@Override
|
||||
public void RefreshProjectFiles() {
|
||||
@@ -262,16 +262,16 @@ public class ProjectForm implements FormWithSplitters, ProjectWindow {
|
||||
menuBar.getProjectViewMenu().setIcon(Utils_.getIcon(view.getIcon()));
|
||||
switch (view) {
|
||||
case Files:
|
||||
projectViewPanel.add(filesForm.getContent());
|
||||
projectViewPanel.add(filesForm.getMountPanel());
|
||||
break;
|
||||
case Includes:
|
||||
projectViewPanel.add(includesForm.getContent());
|
||||
projectViewPanel.add(includesForm.getMountPanel());
|
||||
break;
|
||||
case FunctionsHierarchy:
|
||||
projectViewPanel.add(inlineForm2.getContent());
|
||||
projectViewPanel.add(inlineForm2.getMountPanel());
|
||||
break;
|
||||
case FunctionsCallsPoints:
|
||||
projectViewPanel.add(inlineForm.getContent());
|
||||
projectViewPanel.add(inlineForm.getMountPanel());
|
||||
break;
|
||||
}
|
||||
projectViewPanel.revalidate();
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</component>
|
||||
</children>
|
||||
</toolbar>
|
||||
<grid id="c476f" binding="dimensionsPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="c476f" binding="dimensionsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -159,8 +159,7 @@
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="d862" binding="distributionPanel" custom-create="true" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<grid id="d862" binding="distributionPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
||||
@@ -29,6 +29,8 @@ public class VariantsForm implements VariantsWindow {
|
||||
public VariantsForm() {
|
||||
LoadSplitters();
|
||||
Global.mainModule.getProject().parallelVariants.mountUI(variantsPanel);
|
||||
distributionForm1 = new TreeForm(RulesTree.class, distributionPanel);
|
||||
dimensionsForm = new DimensionsTableForm(dimensionsPanel);
|
||||
//-
|
||||
BDistributed.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
@@ -49,11 +51,6 @@ public class VariantsForm implements VariantsWindow {
|
||||
}
|
||||
});
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
distributionPanel = (distributionForm1 = new TreeForm(RulesTree.class)).getContent();
|
||||
dimensionsPanel = (dimensionsForm = new DimensionsTableForm()).getContent();
|
||||
}
|
||||
@Override
|
||||
public JPanel getContent() {
|
||||
return content;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="3dd9a" binding="versionsPanel" custom-create="true" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<grid id="3dd9a" binding="versionsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints border-constraint="Center"/>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
|
||||
@@ -28,6 +28,7 @@ public class VersionsForm implements FormWithSplitters, VersionsWindow {
|
||||
public VersionsForm(db_project_info root_in) {
|
||||
LoadSplitters();
|
||||
root = root_in;
|
||||
versionsTreeForm = new TreeForm(VersionsTree.class, versionsPanel);
|
||||
MasterComparsionForm = new VersionsComparisonForm(SlaveComparsionForm = new VersionsComparisonForm(null));
|
||||
SC9.setLeftComponent(MasterComparsionForm.getContent());
|
||||
SC9.setRightComponent(SlaveComparsionForm.getContent());
|
||||
@@ -36,10 +37,6 @@ public class VersionsForm implements FormWithSplitters, VersionsWindow {
|
||||
versionsTabs.setEnabledAt(0, false);
|
||||
versionsPanel.add(Global.mainModule.getUI().getVersionsMenuBar(), BorderLayout.NORTH);
|
||||
}
|
||||
private void createUIComponents() {
|
||||
// TODO: place custom component creation code here
|
||||
versionsPanel = (versionsTreeForm = new TreeForm(VersionsTree.class)).getContent();
|
||||
}
|
||||
@Override
|
||||
public VariantsWindow getVariantsWindow() {
|
||||
return variantsForm;
|
||||
|
||||
Reference in New Issue
Block a user