Package com.jidesoft.combobox

Examples of com.jidesoft.combobox.ColorComboBox


    super(Color.class);
   
  }
 
  protected JComponent createControl(Map arg0) {
    return new ColorComboBox();
  }
View Full Code Here


    return new ColorComboBox();
  }

  protected Binding doBind(JComponent control, FormModel formModel, String formPropertyPath,
      Map context) {
    final ColorComboBox colorComboBox = (ColorComboBox)control;
    return new CustomBinding(formModel, formPropertyPath, Color.class) {

            protected JComponent doBindControl() {
              colorComboBox.setSelectedColor((Color)getValue());
              colorComboBox.addItemListener(new ItemListener(){
               
          public void itemStateChanged(ItemEvent e) {
            if(e.getStateChange() == ItemEvent.SELECTED){
              controlValueChanged(colorComboBox.getSelectedColor());
            }
          }
              });   
                return colorComboBox;
            }

            protected void readOnlyChanged() {
              colorComboBox.setEnabled(isEnabled() && !isReadOnly());
            }

            protected void enabledChanged() {
              colorComboBox.setEnabled(isEnabled() && !isReadOnly());
            }

            protected void valueModelChanged(Object newValue) {
              colorComboBox.setSelectedColor((Color)newValue);
            }
        };
  }
View Full Code Here

TOP

Related Classes of com.jidesoft.combobox.ColorComboBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.