net.sf.sbcc.componentcombo.plaf.motif
Class MotifComponentComboBoxUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by net.sf.sbcc.componentcombo.plaf.ComponentComboBoxUI
          extended by net.sf.sbcc.componentcombo.plaf.basic.BasicComponentComboBoxUI
              extended by net.sf.sbcc.componentcombo.plaf.motif.MotifComponentComboBoxUI
All Implemented Interfaces:
java.io.Serializable

public class MotifComponentComboBoxUI
extends BasicComponentComboBoxUI
implements java.io.Serializable

ComboBox motif look and feel

* Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. SimpleComboBoxUIs are based on a copy of the corresponding ComboBoxUI, just having a few modifications. The behavior is about similar, but without managing the list in the popup. the developer of the specific component must handle the popup closure himself. based on MotifComboBoxUI 1.39, 12/19/03 by Arnaud Weber

Version:
1.0
Author:
Christoph Bimminger
See Also:
Serialized Form

Nested Class Summary
 class MotifComponentComboBoxUI.ComboBoxLayoutManager
          This inner class is marked "public" due to a compiler bug.
(package private) static class MotifComponentComboBoxUI.MotifComboBoxArrowIcon
           
protected  class MotifComponentComboBoxUI.MotifComboPopup
          Overriden to empty the MouseMotionListener. we also needed some modifications because we don't want to close the popup immediately..
 
Nested classes/interfaces inherited from class net.sf.sbcc.componentcombo.plaf.basic.BasicComponentComboBoxUI
BasicComponentComboBoxUI.FocusHandler, BasicComponentComboBoxUI.ItemHandler, BasicComponentComboBoxUI.KeyHandler, BasicComponentComboBoxUI.PropertyChangeHandler, BasicComponentComboBoxUI.SimpleDataHandler
 
Field Summary
(package private)  javax.swing.Icon arrowIcon
           
(package private) static int HORIZ_MARGIN
           
 
Fields inherited from class net.sf.sbcc.componentcombo.plaf.basic.BasicComponentComboBoxUI
arrowButton, cachedMinimumSize, comboBox, currentValuePane, dataListener, editor, focusListener, hasFocus, isMinimumSizeDirty, itemListener, keyListener, popup, popupComponent, popupKeyListener, popupMouseListener, popupMouseMotionListener, propertyChangeListener
 
Constructor Summary
MotifComponentComboBoxUI()
           
 
Method Summary
private  boolean _isLeftToRight(javax.swing.JComponent P_component)
          some additional methods required by my implementation
 void configureEditor()
          This protected method is implementation specific and should be private.
protected  java.awt.LayoutManager createLayoutManager()
          Creates a layout manager for managing the components which make up the combo box.
protected  ComponentComboPopup createPopup()
          Creates the popup portion of the combo box.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
          The minumum size is the size of the display area plus insets plus the button.
 int iconAreaWidth()
           
protected  void installComponents()
          Creates and initializes the components which make up the aggregate combo box.
 void installUI(javax.swing.JComponent c)
           
private  java.awt.Component motifGetEditor()
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
 void paintCurrentValue(java.awt.Graphics g, java.awt.Rectangle bounds, boolean hasFocus)
          Paints the currently selected item.
protected  java.awt.Rectangle rectangleForArrowIcon()
           
protected  java.awt.Rectangle rectangleForCurrentValue()
          Returns the area that is reserved for drawing the currently selected item.
protected  void uninstallComponents()
          The aggregate components which compise the combo box are unregistered and uninitialized.
 
Methods inherited from class net.sf.sbcc.componentcombo.plaf.basic.BasicComponentComboBoxUI
addEditor, configureArrowButton, createArrowButton, createDataListener, createEditor, createFocusListener, createItemListener, createKeyListener, createPropertyChangeListener, createRenderer, getAccessibleChild, getAccessibleChildrenCount, getDisplaySize, getInsets, getMaximumSize, getPreferredSize, installDefaults, installKeyboardActions, installListeners, isFocusTraversable, isNavigationKey, isPopupVisible, paintCurrentValueBackground, removeEditor, setPopupVisible, toggleOpenClose, unconfigureArrowButton, unconfigureEditor, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arrowIcon

javax.swing.Icon arrowIcon

HORIZ_MARGIN

static final int HORIZ_MARGIN
See Also:
Constant Field Values
Constructor Detail

MotifComponentComboBoxUI

public MotifComponentComboBoxUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class BasicComponentComboBoxUI

getMinimumSize

public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
Description copied from class: BasicComponentComboBoxUI
The minumum size is the size of the display area plus insets plus the button.

Overrides:
getMinimumSize in class BasicComponentComboBoxUI

createPopup

protected ComponentComboPopup createPopup()
Description copied from class: BasicComponentComboBoxUI
Creates the popup portion of the combo box.

Overrides:
createPopup in class BasicComponentComboBoxUI
Returns:
an instance of ComboPopup
See Also:
ComponentComboPopup

installComponents

protected void installComponents()
Description copied from class: BasicComponentComboBoxUI
Creates and initializes the components which make up the aggregate combo box. This method is called as part of the UI installation process.

Overrides:
installComponents in class BasicComponentComboBoxUI

uninstallComponents

protected void uninstallComponents()
Description copied from class: BasicComponentComboBoxUI
The aggregate components which compise the combo box are unregistered and uninitialized. This method is called as part of the UI uninstallation process.

Overrides:
uninstallComponents in class BasicComponentComboBoxUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class BasicComponentComboBoxUI

paintCurrentValue

public void paintCurrentValue(java.awt.Graphics g,
                              java.awt.Rectangle bounds,
                              boolean hasFocus)
Description copied from class: BasicComponentComboBoxUI
Paints the currently selected item.

Overrides:
paintCurrentValue in class BasicComponentComboBoxUI

rectangleForArrowIcon

protected java.awt.Rectangle rectangleForArrowIcon()

rectangleForCurrentValue

protected java.awt.Rectangle rectangleForCurrentValue()
Description copied from class: BasicComponentComboBoxUI
Returns the area that is reserved for drawing the currently selected item.

Overrides:
rectangleForCurrentValue in class BasicComponentComboBoxUI

iconAreaWidth

public int iconAreaWidth()

configureEditor

public void configureEditor()
Description copied from class: BasicComponentComboBoxUI
This protected method is implementation specific and should be private. do not call or override.

Overrides:
configureEditor in class BasicComponentComboBoxUI
See Also:
BasicComponentComboBoxUI.addEditor()

createLayoutManager

protected java.awt.LayoutManager createLayoutManager()
Description copied from class: BasicComponentComboBoxUI
Creates a layout manager for managing the components which make up the combo box.

Overrides:
createLayoutManager in class BasicComponentComboBoxUI
Returns:
an instance of a layout manager

motifGetEditor

private java.awt.Component motifGetEditor()

_isLeftToRight

private boolean _isLeftToRight(javax.swing.JComponent P_component)
some additional methods required by my implementation