public class AutoButtonBar extends JToolBar
buttonIconName
and buttonToolTip
which hold the icon filenames and tooltip text repecively for each Button.JToolBar.AccessibleJToolBar, JToolBar.Separator
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
String[] |
buttonIconName
An array of strings that hold the names of the image files that will
be used for the button icons.
|
String[] |
buttonToolTip
An array of Strings for the botton tool tip text.
|
private URL |
codeBase
The Codes Base URL.
|
private static ActionListener |
controller
The Class Object representing the controller class that will be called to
deal with this buttonBars action events.
|
private int |
debug
Description of the Field
|
(package private) String |
fileSeperator
A holder for the the users filesystem separator.
|
private int |
i
Description of the Field
|
private int |
numberOfFiles
Description of the Field
|
private String |
relImageLocator
The relative resource locator to find the image files, relative to
the baseURL.
|
private StatusBar |
statusBar
Description of the Field
|
(package private) URL |
tempURL
A URL to hold the images for the buttons.
|
private JButton[] |
toolButton
Description of the Field
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
AutoButtonBar(JPanel mdiPanel,
StatusBar sb,
URL cBase)
CONSTRUCTOR Creates a new AutoButtonBar that is assciated with the
passed in JInternalFrame components.
|
AutoButtonBar(URL cb)
CONSTRUCTOR Creates a new AutoButtonBar but DOES NOT init its buttons.
|
AutoButtonBar(URL cb,
String[] iconNames,
String[] iconToolTips,
Object handler)
CONSTRUCTOR Creates a new AutoButtonBar but DOES NOT init its buttons.
|
Modifier and Type | Method and Description |
---|---|
void |
createButtons()
Create the buttons based on the initialized arrays of information.
|
private void |
debugOutput(int l,
String output)
Handles the debug messages by comparing the app debug level to the
message level.
|
int |
getDebug()
Gets the Debug attribute of the AutoButtonBar object
|
private int |
indexOf(String s)
Description of the Method
|
void |
setButtonIconName(String[] s)
Sets the buttonIconName field.
|
void |
setButtonToolTip(String[] s)
Sets the buttonToolTip field.
|
boolean |
setController(Object handler) |
void |
setDebug(int l)
Sets the Debug attribute of the AutoButtonBar object
|
void |
setIcons(String[] iconNames,
String[] iconToolTips) |
void |
setRelImageLocator(String s)
Sets the relative pathe field that is used ad a relative path the
iconnames.
|
add, addImpl, addSeparator, addSeparator, createActionChangeListener, createActionComponent, getAccessibleContext, getComponentAtIndex, getComponentIndex, getMargin, getOrientation, getUI, getUIClassID, isBorderPainted, isFloatable, isRollover, paintBorder, paramString, setBorderPainted, setFloatable, setLayout, setMargin, setOrientation, setRollover, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public String[] buttonIconName
SPECIAL NOTE
To get the names of the 'pressed' and
'hoverover' icon filenames, this class looks for a file with
the prepended words 'Pressed' and 'Over' to the Strings supplied in
the buttonIconName array.
Example...
icon filename = "Print.gif"
hoverover icon
filename = "OverPrint.gif"
pressed icon filename = "PressedPrint.gif"
public String[] buttonToolTip
String fileSeperator
private JButton[] toolButton
private int numberOfFiles
private int i
private int debug
private String relImageLocator
private static ActionListener controller
public AutoButtonBar(URL cb, String[] iconNames, String[] iconToolTips, Object handler)
public AutoButtonBar(URL cb)
public AutoButtonBar(JPanel mdiPanel, StatusBar sb, URL cBase)
sb
- The StatusBar that the functions of the buttons in
this JToolBar will be associated with.codeBase
- The URL that all references to files will be
appended to.mdiPanel
- Description of Parameterpublic boolean setController(Object handler)
public void createButtons()
public void setRelImageLocator(String s)
public void setButtonIconName(String[] s)
public void setButtonToolTip(String[] s)
public void setDebug(int l)
l
- The new Debug valuepublic int getDebug()
private int indexOf(String s)
s
- Description of Parameterprivate void debugOutput(int l, String output)
If the message level is less or == then the message gets output to System.out.
l
- Description of Parameteroutput
- Description of ParameterWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses