Debug Appearance UI
Esse commit está contido em:
@@ -97,4 +97,5 @@ keystore.ks
|
||||
/modules/UILibraryWrapper/target/
|
||||
/modules/AppearanceAPI/target/
|
||||
/modules/AppearancePlugin/target/
|
||||
/modules/AppearancePluginUI/target/
|
||||
/modules/DesktopAppearance/target/
|
||||
@@ -36,6 +36,10 @@
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>ui-utils</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>ui-components</artifactId>
|
||||
|
||||
+42
-15
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.6" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
@@ -16,23 +19,14 @@
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="table">
|
||||
<Container class="javax.swing.JScrollPane" name="centerScrollPane">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="3" rowCount="0">
|
||||
<Column editable="true" title="Title 1" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 2" type="java.lang.Object"/>
|
||||
<Column editable="true" title="Title 3" type="java.lang.Object"/>
|
||||
</Table>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="null" type="code"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
|
||||
<JTableSelectionModel selectionMode="0"/>
|
||||
</Property>
|
||||
<Property name="showHorizontalLines" type="boolean" value="false"/>
|
||||
<Property name="showVerticalLines" type="boolean" value="false"/>
|
||||
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="null" type="code"/>
|
||||
<Property name="viewportView" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
|
||||
<ComponentRef name="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
@@ -40,6 +34,39 @@
|
||||
<GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="4" insetsLeft="10" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="backPanel">
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="table">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="0" rowCount="0"/>
|
||||
</Property>
|
||||
<Property name="opaque" type="boolean" value="false"/>
|
||||
<Property name="rowHeight" type="int" value="18"/>
|
||||
<Property name="rowMargin" type="int" value="4"/>
|
||||
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
|
||||
<JTableSelectionModel selectionMode="0"/>
|
||||
</Property>
|
||||
<Property name="showHorizontalLines" type="boolean" value="false"/>
|
||||
<Property name="showVerticalLines" type="boolean" value="false"/>
|
||||
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="null" type="code"/>
|
||||
</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="0" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
+31
-6
@@ -58,6 +58,7 @@ import javax.swing.Icon;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPopupMenu;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableCellEditor;
|
||||
import javax.swing.table.TableCellRenderer;
|
||||
@@ -65,6 +66,7 @@ import javax.swing.table.TableColumn;
|
||||
import net.java.dev.colorchooser.ColorChooser;
|
||||
import org.gephi.appearance.api.PartitionFunction;
|
||||
import org.gephi.appearance.plugin.PartitionElementColorTransformer;
|
||||
import org.gephi.ui.utils.UIUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -78,6 +80,9 @@ public class PartitionColorTransformerPanel extends javax.swing.JPanel {
|
||||
|
||||
public PartitionColorTransformerPanel() {
|
||||
initComponents();
|
||||
if (UIUtils.isAquaLookAndFeel()) {
|
||||
backPanel.setBackground(UIManager.getColor("NbExplorerView.background"));
|
||||
}
|
||||
createPopup();
|
||||
table.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
@@ -98,9 +103,6 @@ public class PartitionColorTransformerPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
table.setRowMargin(4);
|
||||
table.setRowHeight(18);
|
||||
}
|
||||
|
||||
public void setup(PartitionFunction function) {
|
||||
@@ -125,7 +127,7 @@ public class PartitionColorTransformerPanel extends javax.swing.JPanel {
|
||||
public int compare(Object o1, Object o2) {
|
||||
float p1 = PartitionColorTransformerPanel.this.function.getPartition().percentage(o1);
|
||||
float p2 = PartitionColorTransformerPanel.this.function.getPartition().percentage(o2);
|
||||
return p1 > p2 ? 1 : p1 < p2 ? -1 : 0;
|
||||
return p1 > p2 ? -1 : p1 < p2 ? 1 : 0;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -284,23 +286,44 @@ public class PartitionColorTransformerPanel extends javax.swing.JPanel {
|
||||
private void initComponents() {
|
||||
java.awt.GridBagConstraints gridBagConstraints;
|
||||
|
||||
centerScrollPane = new javax.swing.JScrollPane();
|
||||
backPanel = new javax.swing.JPanel();
|
||||
table = new javax.swing.JTable();
|
||||
|
||||
setOpaque(false);
|
||||
setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
centerScrollPane.setBorder(null);
|
||||
centerScrollPane.setOpaque(false);
|
||||
centerScrollPane.setViewportView(null);
|
||||
|
||||
backPanel.setLayout(new java.awt.GridBagLayout());
|
||||
|
||||
table.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
|
||||
},
|
||||
new String [] {
|
||||
"Title 1", "Title 2", "Title 3"
|
||||
|
||||
}
|
||||
));
|
||||
table.setOpaque(false);
|
||||
table.setRowHeight(18);
|
||||
table.setRowMargin(4);
|
||||
table.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
||||
table.setShowHorizontalLines(false);
|
||||
table.setShowVerticalLines(false);
|
||||
table.setTableHeader(null);
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
backPanel.add(table, gridBagConstraints);
|
||||
|
||||
centerScrollPane.setViewportView(backPanel);
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 0;
|
||||
gridBagConstraints.gridy = 0;
|
||||
@@ -308,9 +331,11 @@ public class PartitionColorTransformerPanel extends javax.swing.JPanel {
|
||||
gridBagConstraints.weightx = 1.0;
|
||||
gridBagConstraints.weighty = 1.0;
|
||||
gridBagConstraints.insets = new java.awt.Insets(4, 10, 0, 0);
|
||||
add(table, gridBagConstraints);
|
||||
add(centerScrollPane, gridBagConstraints);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel backPanel;
|
||||
private javax.swing.JScrollPane centerScrollPane;
|
||||
private javax.swing.JTable table;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
+1
-2
@@ -42,7 +42,6 @@
|
||||
package org.gephi.ui.appearance.plugin;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JPanel;
|
||||
import org.gephi.appearance.api.Function;
|
||||
import org.gephi.appearance.api.SimpleFunction;
|
||||
@@ -80,7 +79,7 @@ public class UniqueElementColorTransformerUI implements TransformerUI {
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return new ImageIcon("resources/color.png");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-1
@@ -359,7 +359,6 @@ public class AppearanceToolbar implements AppearanceUIModelListener {
|
||||
buttonGroup.add(btn);
|
||||
add(btn);
|
||||
}
|
||||
|
||||
buttonGroups.add(buttonGroup);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -101,6 +101,7 @@ public class AppearanceTopComponent extends TopComponent implements Lookup.Provi
|
||||
initSouth();
|
||||
if (UIUtils.isAquaLookAndFeel()) {
|
||||
mainPanel.setBackground(UIManager.getColor("NbExplorerView.background"));
|
||||
centerPanel.setBackground(UIManager.getColor("NbExplorerView.background"));
|
||||
}
|
||||
|
||||
refreshModel(model);
|
||||
@@ -201,6 +202,7 @@ public class AppearanceTopComponent extends TopComponent implements Lookup.Provi
|
||||
}
|
||||
|
||||
if (transformerPanel != null) {
|
||||
transformerPanel.setOpaque(false);
|
||||
centerPanel.add(transformerPanel, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ public class AppearanceUIController {
|
||||
public void setSelectedFunction(Function function) {
|
||||
if (model != null) {
|
||||
Function oldValue = model.getSelectedFunction();
|
||||
if ((oldValue == null && function != null) || (oldValue != null && function == null) || !oldValue.equals(function)) {
|
||||
if ((oldValue == null && function != null) || (oldValue != null && function == null) || (function != null && oldValue != null && !oldValue.equals(function))) {
|
||||
model.setSelectedFunction(function);
|
||||
firePropertyChangeEvent(AppearanceUIModelEvent.SELECTED_FUNCTION, oldValue, function);
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário