|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--kiwi.ui.KPanel | +--kiwi.ui.ArrowButtonView
This class represents a panel of VCR-style buttons, including First, Previous, Next, and Last buttons. These buttons represent a bounded range of items that may be traversed.
The component maintains the current position within the list being
traversed. This position may be retrieved at any time via a call to the
getPosition()
method. Additionally, an ActionEvent is
generated each time one of the four buttons is pressed; one of the command
strings "first", "prev", "next", or "last" is passed as the argument of the
ActionEvent
to specify which button was pressed.
The First and Previous buttons are dimmed when the component is at the "beginning" of the range, and the Next and Last buttons are dimmed when the component is at the "end" of the range.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
ArrowButtonView(int range)
Construct a new ArrowButtonView . |
Method Summary | |
void |
addActionListener(ActionListener listener)
Add an ActionListener to this component's list of listeners. |
int |
getPosition()
Get the traversal position. |
int |
getRange()
Get the traversal range. |
void |
removeActionListener(ActionListener listener)
Remove an ActionListener from this component's list of
listeners. |
Methods inherited from class kiwi.ui.KPanel |
getComponentByName,
paintComponent,
setOpaque,
setTexture |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ArrowButtonView(int range) throws IllegalArgumentException
ArrowButtonView
.range
- The number of items being traversed.range
is
less than 0.Method Detail |
public int getPosition()
getRange() - 1
],
inclusive.public int getRange()
public void addActionListener(ActionListener listener)
ActionListener
to this component's list of listeners.listener
- The listener to add.public void removeActionListener(ActionListener listener)
ActionListener
from this component's list of
listeners.listener
- The listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |