当前位置: 首页>>代码示例>>Java>>正文


Java GreyPalette类代码示例

本文整理汇总了Java中org.jfree.chart.plot.GreyPalette的典型用法代码示例。如果您正苦于以下问题:Java GreyPalette类的具体用法?Java GreyPalette怎么用?Java GreyPalette使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GreyPalette类属于org.jfree.chart.plot包,在下文中一共展示了GreyPalette类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testEquals

import org.jfree.chart.plot.GreyPalette; //导入依赖的package包/类
/**
 * Check that the equals() method can distinguish all fields.
 */
public void testEquals() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertEquals(c1, c2);
    
    c1.setAxis(new NumberAxis("Axis 1"));
    assertTrue(!c1.equals(c2));
    c2.setAxis(new NumberAxis("Axis 1"));
    assertTrue(c1.equals(c2));
    
    c1.setColorPalette(new GreyPalette());
    assertTrue(!c1.equals(c2));
    c2.setColorPalette(new GreyPalette());
    assertTrue(c1.equals(c2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:19,代码来源:ColorBarTests.java

示例2: testEquals

import org.jfree.chart.plot.GreyPalette; //导入依赖的package包/类
/**
 * Check that the equals() method can distinguish all fields.
 */
@Test
public void testEquals() {
    ColorBar c1 = new ColorBar("Test");
    ColorBar c2 = new ColorBar("Test");
    assertEquals(c1, c2);

    c1.setAxis(new NumberAxis("Axis 1"));
    assertTrue(!c1.equals(c2));
    c2.setAxis(new NumberAxis("Axis 1"));
    assertTrue(c1.equals(c2));

    c1.setColorPalette(new GreyPalette());
    assertTrue(!c1.equals(c2));
    c2.setColorPalette(new GreyPalette());
    assertTrue(c1.equals(c2));
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:20,代码来源:ColorBarTest.java

示例3: testEquals

import org.jfree.chart.plot.GreyPalette; //导入依赖的package包/类
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {
    ColorPalette p1 = new GreyPalette();
    ColorPalette p2 = new GreyPalette();
    assertTrue(p1.equals(p2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:ColorPaletteTests.java

示例4: DefaultColorBarEditor

import org.jfree.chart.plot.GreyPalette; //导入依赖的package包/类
/**
 * 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);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:55,代码来源:DefaultColorBarEditor.java

示例5: DefaultColorBarEditor

import org.jfree.chart.plot.GreyPalette; //导入依赖的package包/类
/**
 * 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);

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:55,代码来源:DefaultColorBarEditor.java


注:本文中的org.jfree.chart.plot.GreyPalette类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。