|
|||||||
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 | +--java.awt.Panel | +--ToolbarPanel
Objects of this class are panel that have a row of bitmapped buttons and optional separators. The buttons can act like push buttons. The toolbar can be locate at the top or bottom in the horizontal orientation or at the left or right side in vertical orientation. All parameters are defined in Rosa applet parameters
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
java.lang.String |
kstrBottom
Constant - Location of the toolbar. |
private java.lang.String |
kstrBottomAling
Alignment of the toolbar. |
private java.lang.String |
kstrCenterAling
Alignment of the toolbar. |
protected java.lang.String |
kstrDefImageParam
Postfix parameters name using for reading the default image on the button. |
protected java.lang.String |
kstrImagePressParam
Postfix parameters name using for reading the pressed state image on the button. |
java.lang.String |
kstrLeft
Constant - Location of the toolbar. |
private java.lang.String |
kstrLeftAling
Alignment of the toolbar. |
private java.lang.String |
kstrMiddleAling
Alignment of the toolbar. |
java.lang.String |
kstrRight
Constant - Location of the toolbar. |
private java.lang.String |
kstrRightAling
Alignment of the toolbar. |
java.lang.String |
kstrTop
Constant - Location of the toolbar. |
private java.lang.String |
kstrTopAling
Alignment of the toolbar. |
private boolean |
m_bIsVertical
TRUE if the orientation of the toolbar is vertical |
private Map |
m_buttonListener
this object answer to the button command |
private int |
m_nNbrButton
Number of button item in the toolbar |
private Rosa2000 |
m_parent
Use to place the buttons |
private java.awt.Point |
m_ptLocation
XY location of the toolbar inside the applet. |
private java.lang.String |
m_strAlign
Used to define the aligment of the toolbar. |
private java.lang.String |
m_strLocation
Used to define the location of the toolbar. |
Fields inherited from class java.awt.Panel |
base,
nameCounter,
serialVersionUID |
Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
(package private) |
ToolbarPanel(Rosa2000 parent,
Map listener,
java.lang.String strLocation,
java.lang.String strAlignment)
Constructor. |
Method Summary | |
void |
addButton(ButtonCtrl button)
Add the button in the toolbar. |
void |
automaticPlace()
Place the toolbar at the defined location in the applet. |
protected void |
autoPlace(int nIndex,
ButtonCtrl button)
Place automaticaly the button passed in parameter at the index position. |
boolean |
createButton(java.lang.String strButtonName)
Create a new button using the string name passed in parameter. |
java.lang.String |
getAligment()
Return the aligment string of the toolbar. |
java.awt.Dimension |
getCurrentSize()
Return the dimension of the toolbar. |
java.lang.String |
getTbLocation()
Return the string location. |
void |
moveTB(int nX,
int nY)
Move the toolbar at the possition passed in parameter. |
protected void |
placeTbHorizontal()
Place the toolbar in horizontal orientation |
protected void |
placeTbVertical()
Place the toolbar in vertical orientation |
private java.awt.Image |
readButtonImage(java.lang.String strNameParam)
Read the button image from the parameters applet and load it. |
void |
setAlignment(java.lang.String strAlignment)
Validate and assing the alingment. |
void |
setButtonPress(ButtonCtrl button)
Set the button passed in parameter in pressed state. |
void |
setLocation(java.lang.String strLocation)
Set the Location of the toolbar. |
Methods inherited from class java.awt.Panel |
|
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventImpl,
dispatchEventToSelf,
doLayout,
eventEnabled,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getCursorTarget,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
initIDs,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paint,
paintComponents,
paramString,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
print,
printComponents,
printOneComponent,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
readObject,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFocusOwner,
setFont,
setLayout,
transferFocus,
update,
updateCursor,
validate,
validateTree,
writeObject |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
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,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Field Detail |
public final java.lang.String kstrTop
public final java.lang.String kstrBottom
public final java.lang.String kstrLeft
public final java.lang.String kstrRight
protected final java.lang.String kstrDefImageParam
protected final java.lang.String kstrImagePressParam
private final java.lang.String kstrTopAling
private final java.lang.String kstrBottomAling
private final java.lang.String kstrMiddleAling
private final java.lang.String kstrCenterAling
private final java.lang.String kstrLeftAling
private final java.lang.String kstrRightAling
private int m_nNbrButton
private boolean m_bIsVertical
private java.lang.String m_strAlign
private java.lang.String m_strLocation
private Map m_buttonListener
private Rosa2000 m_parent
private java.awt.Point m_ptLocation
Constructor Detail |
ToolbarPanel(Rosa2000 parent, Map listener, java.lang.String strLocation, java.lang.String strAlignment)
parent
- Reference on the applet.listener
- This object will receive the button action.strLocation
- String location.strAligment
- Sting aligment.Method Detail |
public void setLocation(java.lang.String strLocation)
strLocation
- Location of the toolbar.public java.lang.String getAligment()
public java.lang.String getTbLocation()
public void setButtonPress(ButtonCtrl button)
button
- Button to set.public void setAlignment(java.lang.String strAlignment)
public boolean createButton(java.lang.String strButtonName)
strButtonName
- Name of the button. It use to read the applet parameters.private java.awt.Image readButtonImage(java.lang.String strNameParam)
public void addButton(ButtonCtrl button)
button
- Button to add.public java.awt.Dimension getCurrentSize()
protected void autoPlace(int nIndex, ButtonCtrl button)
public void moveTB(int nX, int nY)
public void automaticPlace()
protected void placeTbVertical()
protected void placeTbHorizontal()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |