Java 类javax.swing.colorchooser.ColorChooserComponentFactory 实例源码

项目:cn1    文件:JColorChooserTest.java   
public void testSetGetPreviewPanel() throws Exception {
    ch.addPropertyChangeListener(propertyChangeController);
    assertNotNull(ch.getPreviewPanel());
    JButton button = new JButton();
    ch.setPreviewPanel(button);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertSame(button, ch.getPreviewPanel());
    assertSame(button, ((PropertyChangeEvent) propertyChangeController.getLastEvent())
            .getNewValue());
    propertyChangeController.reset();
    ch.setPreviewPanel(null);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertNotNull(ch.getPreviewPanel());
    assertSame(ColorChooserComponentFactory.getPreviewPanel().getClass(), ch
            .getPreviewPanel().getClass());
}
项目:freeVM    文件:JColorChooserTest.java   
public void testSetGetPreviewPanel() throws Exception {
    ch.addPropertyChangeListener(propertyChangeController);
    assertNotNull(ch.getPreviewPanel());
    JButton button = new JButton();
    ch.setPreviewPanel(button);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertSame(button, ch.getPreviewPanel());
    assertSame(button, ((PropertyChangeEvent) propertyChangeController.getLastEvent())
            .getNewValue());
    propertyChangeController.reset();
    ch.setPreviewPanel(null);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertNotNull(ch.getPreviewPanel());
    assertSame(ColorChooserComponentFactory.getPreviewPanel().getClass(), ch
            .getPreviewPanel().getClass());
}
项目:freeVM    文件:JColorChooserTest.java   
public void testSetGetPreviewPanel() throws Exception {
    ch.addPropertyChangeListener(propertyChangeController);
    assertNotNull(ch.getPreviewPanel());
    JButton button = new JButton();
    ch.setPreviewPanel(button);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertSame(button, ch.getPreviewPanel());
    assertSame(button, ((PropertyChangeEvent) propertyChangeController.getLastEvent())
            .getNewValue());
    propertyChangeController.reset();
    ch.setPreviewPanel(null);
    assertTrue(propertyChangeController.isChanged(JColorChooser.PREVIEW_PANEL_PROPERTY));
    assertNotNull(ch.getPreviewPanel());
    assertSame(ColorChooserComponentFactory.getPreviewPanel().getClass(), ch
            .getPreviewPanel().getClass());
}
项目:cn1    文件:JColorChooser.java   
public void setPreviewPanel(JComponent preview) {
    JComponent oldValue = previewPanel;
    if (preview == null) {
        previewPanel = ColorChooserComponentFactory.getPreviewPanel();
    } else {
        previewPanel = preview;
    }
    firePropertyChange(PREVIEW_PANEL_PROPERTY, oldValue, previewPanel);
}
项目:cn1    文件:BasicColorChooserUI.java   
protected void installPreviewPanel() {
    if (chooser.getPreviewPanel() == null) {
        chooser.setPreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
        chooser.getPreviewPanel().setForeground(model.getSelectedColor());

        return;
    }
    previewPanel.removeAll();
    previewPanel.add(chooser.getPreviewPanel());
    previewPanel.setBorder(BorderFactory.createTitledBorder(UIManager.getString("ColorChooser.previewText")));

    if (previewPanel.getParent() == null) {
        chooser.add(previewPanel, BorderLayout.SOUTH);
    }
}
项目:freeVM    文件:JColorChooser.java   
public void setPreviewPanel(JComponent preview) {
    JComponent oldValue = previewPanel;
    if (preview == null) {
        previewPanel = ColorChooserComponentFactory.getPreviewPanel();
    } else {
        previewPanel = preview;
    }
    firePropertyChange(PREVIEW_PANEL_PROPERTY, oldValue, previewPanel);
}
项目:freeVM    文件:BasicColorChooserUI.java   
protected void installPreviewPanel() {
    if (chooser.getPreviewPanel() == null) {
        chooser.setPreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
        chooser.getPreviewPanel().setForeground(model.getSelectedColor());

        return;
    }
    previewPanel.removeAll();
    previewPanel.add(chooser.getPreviewPanel());
    previewPanel.setBorder(BorderFactory.createTitledBorder(UIManager.getString("ColorChooser.previewText")));

    if (previewPanel.getParent() == null) {
        chooser.add(previewPanel, BorderLayout.SOUTH);
    }
}
项目:freeVM    文件:JColorChooser.java   
public void setPreviewPanel(JComponent preview) {
    JComponent oldValue = previewPanel;
    if (preview == null) {
        previewPanel = ColorChooserComponentFactory.getPreviewPanel();
    } else {
        previewPanel = preview;
    }
    firePropertyChange(PREVIEW_PANEL_PROPERTY, oldValue, previewPanel);
}
项目:freeVM    文件:BasicColorChooserUI.java   
protected void installPreviewPanel() {
    if (chooser.getPreviewPanel() == null) {
        chooser.setPreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
        chooser.getPreviewPanel().setForeground(model.getSelectedColor());

        return;
    }
    previewPanel.removeAll();
    previewPanel.add(chooser.getPreviewPanel());
    previewPanel.setBorder(BorderFactory.createTitledBorder(UIManager.getString("ColorChooser.previewText")));

    if (previewPanel.getParent() == null) {
        chooser.add(previewPanel, BorderLayout.SOUTH);
    }
}
项目:javify    文件:BasicColorChooserUI.java   
/**
 * This method installs the preview panel for the JColorChooser.
 */
protected void installPreviewPanel()
{
  updatePreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
}
项目:jvm-stm    文件:BasicColorChooserUI.java   
/**
 * This method installs the preview panel for the JColorChooser.
 */
protected void installPreviewPanel()
{
  updatePreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
}
项目:cn1    文件:BasicColorChooserUI.java   
protected AbstractColorChooserPanel[] createDefaultChoosers() {
    return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:JamVM-PH    文件:BasicColorChooserUI.java   
/**
 * This method installs the preview panel for the JColorChooser.
 */
protected void installPreviewPanel()
{
  updatePreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
}
项目:classpath    文件:BasicColorChooserUI.java   
/**
 * This method installs the preview panel for the JColorChooser.
 */
protected void installPreviewPanel()
{
  updatePreviewPanel(ColorChooserComponentFactory.getPreviewPanel());
}
项目:freeVM    文件:BasicColorChooserUI.java   
protected AbstractColorChooserPanel[] createDefaultChoosers() {
    return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:freeVM    文件:BasicColorChooserUI.java   
protected AbstractColorChooserPanel[] createDefaultChoosers() {
    return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:javify    文件:BasicColorChooserUI.java   
/**
 * This method creates the default chooser panels for the JColorChooser.
 *
 * @return The default chooser panels.
 */
protected AbstractColorChooserPanel[] createDefaultChoosers()
{
  return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:jvm-stm    文件:BasicColorChooserUI.java   
/**
 * This method creates the default chooser panels for the JColorChooser.
 *
 * @return The default chooser panels.
 */
protected AbstractColorChooserPanel[] createDefaultChoosers()
{
  return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:JamVM-PH    文件:BasicColorChooserUI.java   
/**
 * This method creates the default chooser panels for the JColorChooser.
 *
 * @return The default chooser panels.
 */
protected AbstractColorChooserPanel[] createDefaultChoosers()
{
  return ColorChooserComponentFactory.getDefaultChooserPanels();
}
项目:classpath    文件:BasicColorChooserUI.java   
/**
 * This method creates the default chooser panels for the JColorChooser.
 *
 * @return The default chooser panels.
 */
protected AbstractColorChooserPanel[] createDefaultChoosers()
{
  return ColorChooserComponentFactory.getDefaultChooserPanels();
}