javax.swing.JColorChooser#setChooserPanels ( )源码实例Demo

下面列出了javax.swing.JColorChooser#setChooserPanels ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码2 项目: TencentKona-8   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码3 项目: jdk8u60   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码4 项目: openjdk-jdk8u   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码6 项目: jdk8u-jdk   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码7 项目: hottub   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码8 项目: openjdk-8-source   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码9 项目: openjdk-8   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码10 项目: jdk8u_jdk   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码11 项目: rapidminer-studio   文件: ColorSelectionButton.java
private Color showDialog(Component component, String title, Color initialColor) throws HeadlessException {
	final JColorChooser chooser = new JColorChooser(initialColor != null ? initialColor : Color.white);

	// configuring color chooser panel

	chooser.setPreviewPanel(new JPanel());
	if (colorChoosers != null) {
		chooser.setChooserPanels(colorChoosers);
	} else {
		chooser.removeChooserPanel(chooser.getChooserPanels()[0]);
		chooser.removeChooserPanel(chooser.getChooserPanels()[1]);
	}

	// creating dialog
	ColorTracker ok = new ColorTracker(chooser);
	JDialog dialog = JColorChooser.createDialog(component, title, true, chooser, ok, null);
	dialog.setVisible(true); // blocks until user brings dialog down...
	return ok.getColor();
}
 
源代码12 项目: jdk8u-jdk   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码13 项目: jdk8u-dev-jdk   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[1] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码14 项目: openjdk-jdk9   文件: Test4177735.java
public static void main(String[] args) throws Exception {
    int hsvIndex = 0;
    int panelsLength;
    int finalIndex;
    JColorChooser chooser = new JColorChooser();
    AbstractColorChooserPanel[] panels = chooser.getChooserPanels();
    panelsLength = panels.length;

    for(int i = 0; i < panelsLength; i++) {
        if(panels[i].getDisplayName().equals("HSV")) {
            hsvIndex = i;
        }
    }
    finalIndex = Math.min(hsvIndex, panelsLength - 1);
    chooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[finalIndex] });

    JDialog dialog = show(chooser);
    pause(DELAY);

    dialog.dispose();
    pause(DELAY);

    Test4177735 test = new Test4177735();
    SwingUtilities.invokeAndWait(test);
    if (test.count != 0) {
        throw new Error("JColorChooser leaves " + test.count + " threads running");
    }
}
 
源代码15 项目: snap-desktop   文件: ColorChooserPanel.java
protected Color showMoreColorsDialog() {
    JColorChooser colorChooser = new JColorChooser(getSelectedColor());
    AbstractColorChooserPanel[] oldChooserPanels = colorChooser.getChooserPanels();
    AbstractColorChooserPanel[] newChooserPanels = new AbstractColorChooserPanel[oldChooserPanels.length + 1];
    System.arraycopy(oldChooserPanels, 0, newChooserPanels, 1, oldChooserPanels.length);
    newChooserPanels[0] = new MyAbstractColorChooserPanel();
    colorChooser.setChooserPanels(newChooserPanels);
    ColorTracker colorTracker = new ColorTracker(colorChooser);
    JDialog dialog = JColorChooser.createDialog(this, "Select Colour", true, colorChooser, colorTracker, null);
    dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    dialog.setVisible(true);
    return colorTracker.getColor();
}