fi.hut.tml.xsmiles.gui.components.swing
Class SwingSelectOneCompact

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingSelectBase
              extended byfi.hut.tml.xsmiles.gui.components.swing.SwingSelectOne
                  extended byfi.hut.tml.xsmiles.gui.components.swing.SwingSelectOneCompact
All Implemented Interfaces:
java.util.EventListener, java.awt.ItemSelectable, javax.swing.event.ListSelectionListener, XComponent, XSelect, XSelectOne
Direct Known Subclasses:
SwingSelectManyCompact

public class SwingSelectOneCompact
extends SwingSelectOne
implements XSelectOne, javax.swing.event.ListSelectionListener

select one compact mode

Author:
Mikko Honkala

Field Summary
protected  javax.swing.JList list
          the listbox
 javax.swing.JScrollPane scrollPane
          the Scrollpane
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingSelectOne
selectComponent
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
HELPKEY
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, style
 
Constructor Summary
SwingSelectOneCompact()
           
 
Method Summary
 void addSelection(java.lang.Object o)
           
 java.awt.Component createComponent()
           
 java.awt.Component getAddableComponent()
           
 java.awt.Component getContentComponent()
           
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this type of component null = default.
protected  int getListSelectionModel()
           
 java.awt.Dimension getMinimumSize()
          return the minimum size for this component at zoom level 1.0
 int getSelectedIndex()
           
 java.awt.Component getSizableComponent()
           
 java.awt.Component getStylableComponent()
           
 void removeAll()
           
 void removeSelection(java.lang.Object o)
           
 void setSelected(java.lang.Object o)
           
 void setSelectedIndex(int index)
           
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          the selection events from a list arrive here
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingSelectOne
getSelectedObjects, init, notifyChange
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingSelectBase
addItemListener, removeItemListener
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
addHelpListener, createHint, getFormatter, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getComponent, getDefaultSize, getEnabled, getHeight, getPreferredSize, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, setFocus, setFont, setForeground, setInputMode, setStyle, setVisible, setZoom, sizeComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XSelect
addItemListener, removeItemListener
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XComponent
addActionListener, addFocusListener, addHelpListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 
Methods inherited from interface java.awt.ItemSelectable
addItemListener, removeItemListener
 

Field Detail

list

protected javax.swing.JList list
the listbox


scrollPane

public javax.swing.JScrollPane scrollPane
the Scrollpane

Constructor Detail

SwingSelectOneCompact

public SwingSelectOneCompact()
Method Detail

createComponent

public java.awt.Component createComponent()
Specified by:
createComponent in class SwingSelectOne

getListSelectionModel

protected int getListSelectionModel()

getDefaultBackgroundColor

public java.awt.Color getDefaultBackgroundColor()
the default background color for this type of component null = default.

Overrides:
getDefaultBackgroundColor in class ComponentBase

getMinimumSize

public java.awt.Dimension getMinimumSize()
return the minimum size for this component at zoom level 1.0

Overrides:
getMinimumSize in class ComponentBase

addSelection

public void addSelection(java.lang.Object o)
Specified by:
addSelection in interface XSelect

removeSelection

public void removeSelection(java.lang.Object o)
Specified by:
removeSelection in interface XSelect

removeAll

public void removeAll()
Specified by:
removeAll in interface XSelect

setSelected

public void setSelected(java.lang.Object o)
Specified by:
setSelected in interface XSelect

setSelectedIndex

public void setSelectedIndex(int index)
Specified by:
setSelectedIndex in interface XSelect

getSelectedIndex

public int getSelectedIndex()
Specified by:
getSelectedIndex in interface XSelect

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
the selection events from a list arrive here

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener

getContentComponent

public java.awt.Component getContentComponent()

getAddableComponent

public java.awt.Component getAddableComponent()
Overrides:
getAddableComponent in class ComponentBase

getSizableComponent

public java.awt.Component getSizableComponent()
Overrides:
getSizableComponent in class ComponentBase

getStylableComponent

public java.awt.Component getStylableComponent()
Overrides:
getStylableComponent in class ComponentBase


X-Smiles 1.2