Java Code Examples for org.jfree.chart.axis.ColorBar#getAxis()

The following examples show how to use org.jfree.chart.axis.ColorBar#getAxis() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultColorBarEditor.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 2
Source File: DefaultColorBarEditor.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 3
Source File: DefaultColorBarEditor.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 4
Source File: DefaultColorBarEditor.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 5
Source File: DefaultColorBarEditor.java    From opensim-gui with Apache License 2.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties 
 * defined on this panel.
 * 
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 6
Source File: DefaultColorBarEditor.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 7
Source File: DefaultColorBarEditor.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets the properties of the specified axis to match the properties
 * defined on this panel.
 *
 * @param colorBar  the color bar.
 */
public void setAxisProperties(ColorBar colorBar) {
    super.setAxisProperties(colorBar.getAxis());
    colorBar.setColorPalette(this.currentPalette.getPalette());
    colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
    colorBar.getColorPalette().setStepped(this.stepPalette); //dmo added
}
 
Example 8
Source File: DefaultColorBarEditor.java    From openstock with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 9
Source File: DefaultColorBarEditor.java    From ccu-historian with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 10
Source File: DefaultColorBarEditor.java    From SIMVA-SoS with Apache License 2.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 11
Source File: DefaultColorBarEditor.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 12
Source File: DefaultColorBarEditor.java    From opensim-gui with Apache License 2.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 * 
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse(); 
    this.stepPalette = colorBar.getColorPalette().isStepped(); 
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0] 
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1] 
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"), 
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button 
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 13
Source File: DefaultColorBarEditor.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}
 
Example 14
Source File: DefaultColorBarEditor.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Creates a new edit panel for a color bar.
 *
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse();
    this.stepPalette = colorBar.getColorPalette().isStepped();
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0]
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1]
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"),
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}