|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
es.prodevelop.gvsig.mobile.gui.tool.GenericButton
es.prodevelop.gvsig.mobile.gui.tool.TBWidget
es.prodevelop.gvsig.mobile.gui.tool.TBButton
es.prodevelop.gvsig.mobile.gui.tool.TBComboButton
A button that is aimed to be placed in a tool bar, with the ability to contain several buttons inside. Only one button is shown in the tool bar, the rest are accesible trough a list under a combo box style.
A TBComboButton
must be placed in a ToolBar
and contains:
TBButton
s TBDropDownButton
for accessing the buttons
ToolBar
,
TBButton
,
TBDropDownButton
,
Serialized FormField Summary |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
TBComboButton(ToolBar _owner,
TBButton defaultTBButton,
java.awt.event.MouseListener ml)
Creates an instance of a TBComboButton button by calling to the superclass constructor given the owner where it should be placed (which must be a ToolBar ), the default button
(which must be a TBButton and the
listener of the events for this new instance |
Method Summary | |
void |
addButton(TBButton button,
int index)
Adds a button to the combo list. |
void |
createMenu()
Create a Drop-down menu associated to the combo button with the buttons added to the TBComboButton as the items list |
boolean |
equals(java.lang.Object obj)
Override method of java.lang.Object.equals for inspecting equals in the
buttons of the list |
TBButton |
getActiveTool()
Returns the active tool in the combo list |
int |
getButtonCount()
Returns the number of buttons existing in the combo button. |
TBButton[] |
getButtons()
Returns the array of buttons of type TBButton that
the Combo Button contains |
TBDropDownButton |
getDropDown()
|
int |
getIndex()
Gets the index of the active button in the list |
TBMenu |
getMenu()
|
MainWindow |
getWindow()
Returns the MainWindow of the combo button |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paint(java.awt.Graphics g)
Override method of paint method which forces the paint of
the active button (the visible one in the tool bar) and the arrow |
void |
removeMenu()
Removes the menu associated to the combo button |
void |
setActiveTool(int _index)
Sets the active tool in the combo list |
void |
setActiveTool(TBButton b)
Sets the active tool in the combo list |
void |
setIndex(int index)
Sets the index of the active button in the list |
void |
setSelected(boolean _selected)
Sets all the buttons in the list to selected/unselected status |
void |
setVisible(boolean b)
Override method of java.awt.Component.setVisible
It sets visible only the active button and the drop-down button. |
Methods inherited from class es.prodevelop.gvsig.mobile.gui.tool.TBButton |
buttonClone, getHeight, getHelpText, getStatusBarId, getWidth, setHeight, setStatusBarId, setWidth |
Methods inherited from class es.prodevelop.gvsig.mobile.gui.tool.TBWidget |
getOwner, setOwner |
Methods inherited from class es.prodevelop.gvsig.mobile.gui.tool.GenericButton |
isSelected |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface es.prodevelop.gvsig.mobile.gui.tool.IToolContainer |
repaint |
Constructor Detail |
public TBComboButton(ToolBar _owner, TBButton defaultTBButton, java.awt.event.MouseListener ml)
ToolBar
), the default button
(which must be a TBButton
and the
listener of the events for this new instance
_owner
- Toolbar parent of the TBComboButton (ToolBar
)
where the button is to be addeddefaultTBButton
- Default button of the combo buttons list. The one
that will be seen at the beginning in the Toolbar.
Must be a previously created TBButton
ml
- Listener of Mouse Events, which must be a
MouseListener
Method Detail |
public void addButton(TBButton button, int index) throws GvsigMobileException
TBButton
addButton
in interface IToolContainer
button
- TBButton
to be added to the ToolBarindex
- number of the position that the new button will have in the
array of buttons that the TBComboButton
contains.
It must be an int
between 0 and the actual size of
the array.
GvsigMobileException
public void createMenu()
TBComboButton
as the items list
public void removeMenu()
public int getButtonCount()
getButtonCount
in interface IToolContainer
public TBButton[] getButtons()
TBButton
that
the Combo Button contains
getButtons
in interface IToolContainer
TBButton
public int getIndex()
public void setIndex(int index)
index
- of the new active button in the listpublic TBButton getActiveTool()
TBButton
with the Active Buttonpublic void setActiveTool(int _index)
setActiveTool
in interface IToolContainer
_index
- new index to be the active toolpublic void setActiveTool(TBButton b)
b
- new tool to be the active toolpublic boolean equals(java.lang.Object obj)
java.lang.Object.equals
for inspecting equals in the
buttons of the list
equals
in class TBButton
obj
- Object to inspect if it's equal
true
if the object equal any of the buttons
in the combo button's button listjava.lang.Object.equals
public void setVisible(boolean b)
java.awt.Component.setVisible
It sets visible only the active button and the drop-down button.
public void setSelected(boolean _selected)
setSelected
in class GenericButton
_selected
- true
: Set the active button to selected status
false
: Sets all the buttons to unselected statuspublic TBDropDownButton getDropDown()
public TBMenu getMenu()
public MainWindow getWindow()
getWindow
in interface IToolContainer
public void paint(java.awt.Graphics g)
paint
method which forces the paint of
the active button (the visible one in the tool bar) and the arrow
paint
in class GenericButton
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |