DESY ACOP Beans Home

com.cosylab.gui.components
Class SimpleComboBox.SwitchComboBoxUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.ComboBoxUI
          extended by com.cosylab.gui.components.SimpleComboBox.SimpleComboBoxUI
              extended by com.cosylab.gui.components.SimpleComboBox.SwitchComboBoxUI
Enclosing class:
SimpleComboBox

public static class SimpleComboBox.SwitchComboBoxUI
extends SimpleComboBox.SimpleComboBoxUI

Version:
$id$ This extension of SimpleComboBoxUI positions two buttons on each side of the combo box to be used for switching between items in the drop-down list.
Author:
Jernej Kamenik

Nested Class Summary
 
Nested classes/interfaces inherited from class com.cosylab.gui.components.SimpleComboBox.SimpleComboBoxUI
SimpleComboBox.SimpleComboBoxUI.ComboBoxLayoutManager
 
Field Summary
protected  ArrowButton leftButton
           
protected  ArrowButton rightButton
           
 
Fields inherited from class com.cosylab.gui.components.SimpleComboBox.SimpleComboBoxUI
cellRenderingPane, comboBox, itemListener, popup
 
Constructor Summary
SimpleComboBox.SwitchComboBoxUI()
           
 
Method Summary
protected  void calculateLayout()
           
protected  java.awt.Dimension calculatePreferredSize()
           
protected  java.awt.Rectangle calculateRendererCellRectangle()
           
protected  SimpleButton getLeftButton()
           
protected  SimpleButton getRightButton()
           
 void installUI(javax.swing.JComponent c)
          This method has been overriden to implement installation of the two additional buttons.
 boolean isPopupEnabled()
          Returns wether the popup list dialog is enabled.
 void setPopupEnabled(boolean newPopupEnabled)
          Sets the popupEnabled.
 void uninstallUI(javax.swing.JComponent c)
          This method has been overriden to implement uninstallation of the two additional buttons.
 
Methods inherited from class com.cosylab.gui.components.SimpleComboBox.SimpleComboBoxUI
getMaximumSize, getMinimumSize, getPreferredSize, isFocusTraversable, isPopupVisible, paint, setPopupVisible
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leftButton

protected ArrowButton leftButton

rightButton

protected ArrowButton rightButton
Constructor Detail

SimpleComboBox.SwitchComboBoxUI

public SimpleComboBox.SwitchComboBoxUI()
Method Detail

getLeftButton

protected SimpleButton getLeftButton()

getRightButton

protected SimpleButton getRightButton()

calculatePreferredSize

protected java.awt.Dimension calculatePreferredSize()
Overrides:
calculatePreferredSize in class SimpleComboBox.SimpleComboBoxUI

calculateRendererCellRectangle

protected java.awt.Rectangle calculateRendererCellRectangle()
Overrides:
calculateRendererCellRectangle in class SimpleComboBox.SimpleComboBoxUI

calculateLayout

protected void calculateLayout()
Overrides:
calculateLayout in class SimpleComboBox.SimpleComboBoxUI

isPopupEnabled

public boolean isPopupEnabled()
Returns wether the popup list dialog is enabled.

Returns:
boolean

setPopupEnabled

public void setPopupEnabled(boolean newPopupEnabled)
Sets the popupEnabled. When true, the user can access the drop-down list by clicking on the selected item cell.

Parameters:
newPopupEnabled - The popupEnabled to set

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
This method has been overriden to implement uninstallation of the two additional buttons.

Overrides:
uninstallUI in class SimpleComboBox.SimpleComboBoxUI
Parameters:
c - JComponent
See Also:
ComponentUI.uninstallUI(JComponent)

installUI

public void installUI(javax.swing.JComponent c)
This method has been overriden to implement installation of the two additional buttons.

Overrides:
installUI in class SimpleComboBox.SimpleComboBoxUI
Parameters:
c - JComponent
See Also:
ComponentUI.installUI(JComponent)


Copyright © 2010. All Rights Reserved.