Package org.pushingpixels.substance.api.renderers

Examples of org.pushingpixels.substance.api.renderers.SubstanceDefaultComboBoxRenderer


   *
   * @see javax.swing.plaf.basic.BasicComboBoxUI#getDefaultSize()
   */
  @Override
  protected Dimension getDefaultSize() {
    Component rend = new SubstanceDefaultComboBoxRenderer(this.comboBox)
        .getListCellRendererComponent(listBox, " ", -1, false, false);
    rend.setFont(this.comboBox.getFont());

    return rend.getPreferredSize();
  }
View Full Code Here


    final JComboBox menuGutterFillCombo = new JComboBox(new Object[] {
        MenuGutterFillKind.NONE, MenuGutterFillKind.SOFT,
        MenuGutterFillKind.HARD, MenuGutterFillKind.SOFT_FILL,
        MenuGutterFillKind.HARD_FILL });
    menuGutterFillCombo.setRenderer(new SubstanceDefaultComboBoxRenderer(
        menuGutterFillCombo) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
View Full Code Here

        this.setSelectedItem(skinInfo);
        break;
      }
    }
    // set custom renderer to show the skin display name
    this.setRenderer(new SubstanceDefaultComboBoxRenderer(this) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
        return super.getListCellRendererComponent(list,
View Full Code Here

    final JComboBox animationKindCombo = new JComboBox(new Object[] {
        AnimationKind.NONE, AnimationKind.FAST, AnimationKind.REGULAR,
        AnimationKind.SLOW, AnimationKind.DEBUG_FAST,
        AnimationKind.DEBUG, AnimationKind.DEBUG_SLOW });
    animationKindCombo.setRenderer(new SubstanceDefaultComboBoxRenderer(
        animationKindCombo) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
View Full Code Here

    final JComboBox focusKindCombo = new JComboBox(
        new Object[] { FocusKind.NONE, FocusKind.ALL,
            FocusKind.ALL_INNER, FocusKind.TEXT,
            FocusKind.UNDERLINE, FocusKind.STRONG_UNDERLINE });
    focusKindCombo.setRenderer(new SubstanceDefaultComboBoxRenderer(
        focusKindCombo) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
View Full Code Here

  }

  @Override
  public void updateUI() {
    if (SubstanceLookAndFeel.isCurrentLookAndFeel()) {
      setRenderer(new SubstanceDefaultComboBoxRenderer(this) {
        @Override
        public Component getListCellRendererComponent(JList list,
            Object value, int index, boolean isSelected,
            boolean cellHasFocus) {
          Component result = super.getListCellRendererComponent(list,
View Full Code Here

    final JPanel panel = new JPanel(new FlowLayout());
    // Get all skins and set the vector as a model
    // for combobox.
    final JComboBox cb = new JComboBox(new Vector<SkinInfo>(
        SubstanceLookAndFeel.getAllSkins().values()));
    cb.setRenderer(new SubstanceDefaultComboBoxRenderer(cb) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
        SkinInfo si = (SkinInfo) value;
View Full Code Here

    final JComboBox menuGutterFillCombo = new JComboBox(new Object[] {
        MenuGutterFillKind.NONE, MenuGutterFillKind.SOFT,
        MenuGutterFillKind.HARD, MenuGutterFillKind.SOFT_FILL,
        MenuGutterFillKind.HARD_FILL });
    menuGutterFillCombo.setRenderer(new SubstanceDefaultComboBoxRenderer(
        menuGutterFillCombo) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
View Full Code Here

    final JPanel panel = new JPanel(new FlowLayout());
    // Get all skins and set the vector as a model
    // for combobox.
    final JComboBox cb = new JComboBox(new Vector<SkinInfo>(
        SubstanceLookAndFeel.getAllSkins().values()));
    cb.setRenderer(new SubstanceDefaultComboBoxRenderer(cb) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
        SkinInfo si = (SkinInfo) value;
View Full Code Here

    final JComboBox focusKindCombo = new JComboBox(
        new Object[] { FocusKind.NONE, FocusKind.ALL,
            FocusKind.ALL_INNER, FocusKind.TEXT,
            FocusKind.UNDERLINE, FocusKind.STRONG_UNDERLINE });
    focusKindCombo.setRenderer(new SubstanceDefaultComboBoxRenderer(
        focusKindCombo) {
      @Override
      public Component getListCellRendererComponent(JList list,
          Object value, int index, boolean isSelected,
          boolean cellHasFocus) {
View Full Code Here

TOP

Related Classes of org.pushingpixels.substance.api.renderers.SubstanceDefaultComboBoxRenderer

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.