Package org.jvnet.substance

Examples of org.jvnet.substance.SubstanceListUI


      int index, boolean isSelected, boolean cellHasFocus) {
    this.setComponentOrientation(list.getComponentOrientation());

    ListUI listUI = list.getUI();
    if (listUI instanceof SubstanceListUI) {
      SubstanceListUI ui = (SubstanceListUI) listUI;
      ComponentState state = ui.getCellState(index, this);
      ComponentState prevState = ui.getPrevCellState(index);

      SubstanceColorScheme scheme = (state == ComponentState.DEFAULT) ? ui
          .getDefaultColorScheme()
          : ui.getHighlightColorScheme(state);
      if (scheme == null) {
        scheme = (state == ComponentState.DEFAULT) ? SubstanceColorSchemeUtilities
            .getColorScheme(list, state)
            : SubstanceColorSchemeUtilities.getColorScheme(list,
                ColorSchemeAssociationKind.HIGHLIGHT, state);
      }
      SubstanceColorScheme prevScheme = scheme;
      if (prevState != state) {
        prevScheme = (prevState == ComponentState.DEFAULT) ? ui
            .getDefaultColorScheme() : ui
            .getHighlightColorScheme(prevState);
        if (prevScheme == null) {
          prevScheme = (prevState == ComponentState.DEFAULT) ? SubstanceColorSchemeUtilities
              .getColorScheme(list, prevState)
              : SubstanceColorSchemeUtilities.getColorScheme(
View Full Code Here


    JComponent result = (JComponent) super.getListCellRendererComponent(
        list, value, index, isSelected, cellHasFocus);

    ListUI listUI = list.getUI();
    if (listUI instanceof SubstanceListUI) {
      SubstanceListUI ui = (SubstanceListUI) listUI;
      ComponentState state = ui.getCellState(index, result);
      ComponentState prevState = ui.getPrevCellState(index);

      // special case for the combobox. The selected value is
      // painted using the renderer of the list, and the index
      // is -1.
      if (index == -1) {
View Full Code Here

   * @see javax.swing.plaf.basic.BasicComboPopup#hide()
   */
  @Override
  public void hide() {
    super.hide();
    SubstanceListUI ui = (SubstanceListUI) this.list.getUI();
    ui.resetRolloverIndex();
    // this.list.putClientProperty(SubstanceListUI.ROLLED_OVER_INDEX, null);
  }
View Full Code Here

TOP

Related Classes of org.jvnet.substance.SubstanceListUI

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.