Search in sources :

Example 11 with JColorButton

use of org.gephi.ui.components.JColorButton in project gephi by gephi.

the class BrushPanel method initComponents.

/** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    labelDiffusion = new javax.swing.JLabel();
    labelColor = new javax.swing.JLabel();
    diffusionCombobox = new javax.swing.JComboBox();
    colorButton = new JColorButton(Color.BLACK);
    labelIntensity = new javax.swing.JLabel();
    intensitySpinner = new javax.swing.JSpinner();
    jLabel1 = new javax.swing.JLabel();
    labelDiffusion.setFont(labelDiffusion.getFont().deriveFont((float) 10));
    // NOI18N
    labelDiffusion.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.labelDiffusion.text"));
    labelColor.setFont(labelColor.getFont().deriveFont((float) 10));
    // NOI18N
    labelColor.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.labelColor.text"));
    diffusionCombobox.setFont(diffusionCombobox.getFont().deriveFont((float) 10));
    diffusionCombobox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    // NOI18N
    colorButton.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.colorButton.text"));
    colorButton.setContentAreaFilled(false);
    colorButton.setFocusPainted(false);
    labelIntensity.setFont(labelIntensity.getFont().deriveFont((float) 10));
    // NOI18N
    labelIntensity.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.labelIntensity.text"));
    intensitySpinner.setFont(intensitySpinner.getFont().deriveFont((float) 10));
    intensitySpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100, 1));
    jLabel1.setFont(jLabel1.getFont().deriveFont((float) 10));
    // NOI18N
    jLabel1.setText(org.openide.util.NbBundle.getMessage(BrushPanel.class, "BrushPanel.jLabel1.text"));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(labelColor).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(labelIntensity).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(intensitySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 239, Short.MAX_VALUE).addComponent(labelDiffusion).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(diffusionCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(2, 2, 2)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(labelColor, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(intensitySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel1)).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(diffusionCombobox, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelDiffusion, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)));
}
Also used : JColorButton(org.gephi.ui.components.JColorButton) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel)

Example 12 with JColorButton

use of org.gephi.ui.components.JColorButton in project gephi by gephi.

the class EdgePencilPanel method initComponents.

/**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    statusLabel = new javax.swing.JLabel();
    weightSpinner = new javax.swing.JSpinner();
    labelWeight = new javax.swing.JLabel();
    colorButton = new JColorButton(Color.BLACK);
    labelColor = new javax.swing.JLabel();
    typeComboBox = new javax.swing.JComboBox();
    labelType = new javax.swing.JLabel();
    statusLabel.setFont(statusLabel.getFont().deriveFont((float) 10));
    // NOI18N
    statusLabel.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.statusLabel.text"));
    weightSpinner.setFont(weightSpinner.getFont().deriveFont((float) 10));
    weightSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.0f), null, Float.valueOf(0.1f)));
    labelWeight.setFont(labelWeight.getFont().deriveFont((float) 10));
    // NOI18N
    labelWeight.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.labelWeight.text"));
    // NOI18N
    colorButton.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.colorButton.text"));
    colorButton.setContentAreaFilled(false);
    labelColor.setFont(labelColor.getFont().deriveFont((float) 10));
    // NOI18N
    labelColor.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.labelColor.text"));
    typeComboBox.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            typeComboBoxActionPerformed(evt);
        }
    });
    // NOI18N
    labelType.setText(org.openide.util.NbBundle.getMessage(EdgePencilPanel.class, "EdgePencilPanel.labelType.text"));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(statusLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE).addComponent(labelType).addGap(6, 6, 6).addComponent(typeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(labelColor).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(labelWeight).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(weightSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(weightSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelWeight, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelColor, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(statusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(typeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelType, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)));
}
Also used : JColorButton(org.gephi.ui.components.JColorButton)

Example 13 with JColorButton

use of org.gephi.ui.components.JColorButton in project gephi by gephi.

the class NodePencilPanel method initComponents.

/** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    sizeSpinner = new javax.swing.JSpinner();
    labelSize = new javax.swing.JLabel();
    colorButton = new JColorButton(Color.BLACK);
    labelColor = new javax.swing.JLabel();
    statusLabel = new javax.swing.JLabel();
    sizeSpinner.setFont(sizeSpinner.getFont().deriveFont((float) 10));
    sizeSpinner.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(1.0f), Float.valueOf(0.0f), null, Float.valueOf(0.5f)));
    labelSize.setFont(labelSize.getFont().deriveFont((float) 10));
    // NOI18N
    labelSize.setText(org.openide.util.NbBundle.getMessage(NodePencilPanel.class, "NodePencilPanel.labelSize.text"));
    // NOI18N
    colorButton.setText(org.openide.util.NbBundle.getMessage(NodePencilPanel.class, "NodePencilPanel.colorButton.text"));
    colorButton.setContentAreaFilled(false);
    colorButton.setFocusPainted(false);
    labelColor.setFont(labelColor.getFont().deriveFont((float) 10));
    // NOI18N
    labelColor.setText(org.openide.util.NbBundle.getMessage(NodePencilPanel.class, "NodePencilPanel.labelColor.text"));
    statusLabel.setFont(statusLabel.getFont().deriveFont((float) 10));
    // NOI18N
    statusLabel.setText(org.openide.util.NbBundle.getMessage(NodePencilPanel.class, "NodePencilPanel.statusLabel.text"));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(statusLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 238, Short.MAX_VALUE).addComponent(labelColor).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(labelSize).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(sizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(sizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelSize, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(labelColor, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(statusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE));
}
Also used : JColorButton(org.gephi.ui.components.JColorButton)

Example 14 with JColorButton

use of org.gephi.ui.components.JColorButton in project gephi by gephi.

the class PainterPanel method initComponents.

/** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    colorButton = new JColorButton(Color.BLACK);
    labelColor = new javax.swing.JLabel();
    // NOI18N
    colorButton.setText(org.openide.util.NbBundle.getMessage(PainterPanel.class, "PainterPanel.colorButton.text"));
    colorButton.setContentAreaFilled(false);
    colorButton.setFocusPainted(false);
    labelColor.setFont(labelColor.getFont().deriveFont((float) 10));
    // NOI18N
    labelColor.setText(org.openide.util.NbBundle.getMessage(PainterPanel.class, "PainterPanel.labelColor.text"));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(labelColor).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap(465, Short.MAX_VALUE)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(labelColor, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)));
}
Also used : JColorButton(org.gephi.ui.components.JColorButton)

Example 15 with JColorButton

use of org.gephi.ui.components.JColorButton in project gephi by gephi.

the class DependantColorPanel method initComponents.

/** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    buttonGroup1 = new javax.swing.ButtonGroup();
    colorButton = new JColorButton(Color.BLACK);
    customRadio = new javax.swing.JRadioButton();
    parentRadio = new javax.swing.JRadioButton();
    jXHeader1 = new org.jdesktop.swingx.JXHeader();
    buttonGroup1.add(customRadio);
    // NOI18N
    customRadio.setText(org.openide.util.NbBundle.getMessage(DependantColorPanel.class, "DependantColorPanel.customRadio.text"));
    buttonGroup1.add(parentRadio);
    // NOI18N
    parentRadio.setText(org.openide.util.NbBundle.getMessage(DependantColorPanel.class, "DependantColorPanel.parentRadio.text"));
    // NOI18N
    jXHeader1.setDescription(org.openide.util.NbBundle.getMessage(DependantColorPanel.class, "DependantColorPanel.jXHeader1.description"));
    // NOI18N
    jXHeader1.setTitle(org.openide.util.NbBundle.getMessage(DependantColorPanel.class, "DependantColorPanel.jXHeader1.title"));
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jXHeader1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE).addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(parentRadio).addGroup(layout.createSequentialGroup().addComponent(customRadio).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(colorButton))).addGap(221, 221, 221)));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jXHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18).addComponent(parentRadio).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(customRadio).addComponent(colorButton)).addContainerGap(43, Short.MAX_VALUE)));
}
Also used : JColorButton(org.gephi.ui.components.JColorButton)

Aggregations

JColorButton (org.gephi.ui.components.JColorButton)22 VizModel (org.gephi.visualization.VizModel)6 ActionEvent (java.awt.event.ActionEvent)4 ActionListener (java.awt.event.ActionListener)4 ItemEvent (java.awt.event.ItemEvent)3 ItemListener (java.awt.event.ItemListener)3 PropertyChangeEvent (java.beans.PropertyChangeEvent)3 PropertyChangeListener (java.beans.PropertyChangeListener)3 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)3 ChangeEvent (javax.swing.event.ChangeEvent)3 ChangeListener (javax.swing.event.ChangeListener)3 Color (java.awt.Color)2 Font (java.awt.Font)2 TextModelImpl (org.gephi.visualization.text.TextModelImpl)2 BorderLayout (java.awt.BorderLayout)1 CardLayout (java.awt.CardLayout)1 Dimension (java.awt.Dimension)1 JButton (javax.swing.JButton)1 Edge (org.gephi.graph.api.Edge)1 Graph (org.gephi.graph.api.Graph)1