提交 9852ec5b 编写于 作者: M Mathieu Bastian

Report panel UI fixes

上级 acb1ceba
......@@ -23,7 +23,7 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="tabbedPane" alignment="0" pref="609" max="32767" attributes="0"/>
<Component id="tabbedPane" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="labelSrc" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
......@@ -57,7 +57,7 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="labelSrc" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="sourceLabel" alignment="3" min="-2" max="-2" attributes="0"/>
......@@ -73,11 +73,10 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="moreOptionsPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="statsPanel" max="32767" attributes="0"/>
<Component id="processorPanel" max="32767" attributes="1"/>
<Component id="statsPanel" pref="121" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
......@@ -260,6 +259,30 @@
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="labelMultiGraph">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/gephi/desktop/importer/Bundle.properties" key="ReportPanel.labelMultiGraph.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="6" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JLabel" name="multigraphLabel">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/gephi/desktop/importer/Bundle.properties" key="ReportPanel.multigraphLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="1" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="10" insetsBottom="6" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Component class="org.jdesktop.swingx.JXHyperlink" name="moreOptionsLink">
......@@ -284,8 +307,8 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="selfLoopCheckBox" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="autoscaleCheckbox" min="-2" pref="168" max="-2" attributes="1"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="labelParallelEdgesMergeStrategy" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
......@@ -294,7 +317,7 @@
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="createMissingNodesCheckbox" min="-2" max="-2" attributes="1"/>
<Component id="autoscaleCheckbox" alignment="0" min="-2" pref="168" max="-2" attributes="1"/>
<Component id="selfLoopCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
......@@ -308,16 +331,14 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="selfLoopCheckBox" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="3" groupAlignment="3" attributes="0">
<Component id="labelParallelEdgesMergeStrategy" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="edgesMergeStrategyCombo" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="labelParallelEdgesMergeStrategy" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="edgesMergeStrategyCombo" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="autoscaleCheckbox" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="autoscaleCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="createMissingNodesCheckbox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="selfLoopCheckBox" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
......
......@@ -190,6 +190,15 @@ public class ReportPanel extends javax.swing.JPanel {
}
}
});
selfLoopCheckBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (selfLoopCheckBox.isSelected() != container.getUnloader().allowSelfLoop()) {
container.getLoader().setAllowSelfLoop(selfLoopCheckBox.isSelected());
}
}
});
}
public void initIcons() {
......@@ -209,8 +218,6 @@ public class ReportPanel extends javax.swing.JPanel {
fillStats(container);
fillParameters(container);
autoscaleCheckbox.setSelected(container.getUnloader().isAutoScale());
createMissingNodesCheckbox.setSelected(container.getUnloader().allowAutoNode());
}
private void removeTabbedPane() {
......@@ -377,7 +384,10 @@ public class ReportPanel extends javax.swing.JPanel {
edgeCountLabel.setText("" + edgeCount);
//Dynamic & Hierarchical graph
dynamicLabel.setText(container.isDynamicGraph() ? NbBundle.getMessage(getClass(), "ReportPanel.yes") : NbBundle.getMessage(getClass(), "ReportPanel.no"));
String yes = NbBundle.getMessage(getClass(), "ReportPanel.yes");
String no = NbBundle.getMessage(getClass(), "ReportPanel.no");
dynamicLabel.setText(container.isDynamicGraph() ? yes : no);
multigraphLabel.setText(container.isMultiGraph() ? yes : no);
}
});
}
......@@ -459,6 +469,8 @@ public class ReportPanel extends javax.swing.JPanel {
dynamicLabel = new javax.swing.JLabel();
labelDynamic = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
labelMultiGraph = new javax.swing.JLabel();
multigraphLabel = new javax.swing.JLabel();
moreOptionsLink = new org.jdesktop.swingx.JXHyperlink();
moreOptionsPanel = new javax.swing.JPanel();
autoscaleCheckbox = new javax.swing.JCheckBox();
......@@ -549,6 +561,23 @@ public class ReportPanel extends javax.swing.JPanel {
gridBagConstraints.weighty = 1.0;
statsPanel.add(jLabel1, gridBagConstraints);
labelMultiGraph.setText(org.openide.util.NbBundle.getMessage(ReportPanel.class, "ReportPanel.labelMultiGraph.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(0, 0, 6, 0);
statsPanel.add(labelMultiGraph, gridBagConstraints);
multigraphLabel.setText(org.openide.util.NbBundle.getMessage(ReportPanel.class, "ReportPanel.multigraphLabel.text")); // NOI18N
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(0, 10, 6, 0);
statsPanel.add(multigraphLabel, gridBagConstraints);
moreOptionsLink.setText(org.openide.util.NbBundle.getMessage(ReportPanel.class, "ReportPanel.moreOptionsLink.text")); // NOI18N
moreOptionsPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
......@@ -573,7 +602,7 @@ public class ReportPanel extends javax.swing.JPanel {
.addContainerGap()
.addGroup(moreOptionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(moreOptionsPanelLayout.createSequentialGroup()
.addComponent(selfLoopCheckBox)
.addComponent(autoscaleCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(labelParallelEdgesMergeStrategy)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
......@@ -581,7 +610,7 @@ public class ReportPanel extends javax.swing.JPanel {
.addGroup(moreOptionsPanelLayout.createSequentialGroup()
.addGroup(moreOptionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(createMissingNodesCheckbox)
.addComponent(autoscaleCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(selfLoopCheckBox))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
......@@ -590,14 +619,13 @@ public class ReportPanel extends javax.swing.JPanel {
.addGroup(moreOptionsPanelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(moreOptionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(selfLoopCheckBox)
.addGroup(moreOptionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(labelParallelEdgesMergeStrategy)
.addComponent(edgesMergeStrategyCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(autoscaleCheckbox)
.addComponent(labelParallelEdgesMergeStrategy)
.addComponent(edgesMergeStrategyCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(autoscaleCheckbox))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(createMissingNodesCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(selfLoopCheckBox)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
......@@ -608,7 +636,7 @@ public class ReportPanel extends javax.swing.JPanel {
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
.addComponent(tabbedPane)
.addGroup(layout.createSequentialGroup()
.addComponent(labelSrc)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
......@@ -633,7 +661,7 @@ public class ReportPanel extends javax.swing.JPanel {
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(labelSrc)
.addComponent(sourceLabel))
......@@ -647,10 +675,9 @@ public class ReportPanel extends javax.swing.JPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(moreOptionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(processorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(statsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE))
.addContainerGap())
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(statsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(processorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
......@@ -665,11 +692,13 @@ public class ReportPanel extends javax.swing.JPanel {
private javax.swing.JLabel labelDynamic;
private javax.swing.JLabel labelEdgeCount;
private javax.swing.JLabel labelGraphType;
private javax.swing.JLabel labelMultiGraph;
private javax.swing.JLabel labelNodeCount;
private javax.swing.JLabel labelParallelEdgesMergeStrategy;
private javax.swing.JLabel labelSrc;
private org.jdesktop.swingx.JXHyperlink moreOptionsLink;
private javax.swing.JPanel moreOptionsPanel;
private javax.swing.JLabel multigraphLabel;
private javax.swing.JLabel nodeCountLabel;
private javax.swing.JPanel processorPanel;
private javax.swing.ButtonGroup processorStrategyRadio;
......
......@@ -13,7 +13,7 @@ ReportPanel.edgeCountLabel.text=
ReportPanel.labelEdgeCount.text=# of Edges:
ReportPanel.labelNodeCount.text=# of Nodes:
ReportPanel.labelDynamic.text=Dynamic Graph:
ReportPanel.dynamicLabel.text=NaN
ReportPanel.dynamicLabel.text=
ReportPanel.labelGraphType.text=Graph Type:
ReportPanel.tab2ScrollPane.TabConstraints.tabTitle=Report
ReportPanel.autoscaleCheckbox.toolTipText=Scale node size, node position and edge weight to fill the space in an optimized way
......@@ -45,7 +45,6 @@ DesktopImportControllerUI.processor.ui.dialog.title = Processor settings
ReportPanel.createMissingNodesCheckbox.text=Create missing nodes
ReportPanel.createMissingNodesCheckbox.toolTipText=Create missing nodes found as edges' source or target
ReportPanel.moreOptionsLink.text=More options...
ReportPanel.jLabel1.text=
ReportPanel.selfLoopCheckBox.text=Self-loops
ReportPanel.selfLoopCheckBox.toolTipText=Allow self-loops on nodes
ReportPanel.labelParallelEdgesMergeStrategy.text=Edges merge strategy:
......@@ -53,3 +52,6 @@ ReportPanel.mergeStrategy.sum=Sum
ReportPanel.mergeStrategy.avg=Average
ReportPanel.mergeStrategy.min=Minimum
ReportPanel.mergeStrategy.max=Maximum
ReportPanel.jLabel1.text=
ReportPanel.labelMultiGraph.text=Multi Graph:
ReportPanel.multigraphLabel.text=
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册