com.enderak.procol.common.gui
Class ButtonPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.enderak.procol.common.gui.ButtonPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ButtonPanel
extends javax.swing.JPanel

Creates a panel to display RolloverButtons within the ProCol plugin interface

Author:
Justin Dieters
See Also:
Serialized Form

Field Summary
 
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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ButtonPanel()
          Creates an empty ButtonPanel in a horizontal orientation
ButtonPanel(boolean isVerticalAlign)
          Creates an empty ButtonPanel, oriented properly for either a Vertically aligned plugin (floating or docked to the left or right) or a horizontally alighed plugin (docked to the top or bottom)
ButtonPanel(int axisIn)
          Creates an empty ButtonPanel in a particular orientation
 
Method Summary
 org.gjt.sp.jedit.gui.RolloverButton createButton(java.lang.String buttonPrefix)
          Creates a RolloverButton using jEdit's property list.
 org.gjt.sp.jedit.gui.RolloverButton createButton(java.lang.String buttonImageIn, java.lang.String noImageTextIn, java.lang.String toolTipTextIn)
          Creates a RolloverButton with explicit settings passed in and adds it to the ButtonPanel
 void createExpandableSection()
          Creates a section which expands to fill available space
 void createExpandableSpace()
          Creates an expandable spacer of the default size
 void createExpandableSpace(int space)
          Creates an expandable spacer of a specified size
 void createRigidSpace()
          Creates a rigid spacer of the default size
 void createRigidSpace(int space)
          Creates a rigid spacer of a specified size
 org.gjt.sp.jedit.gui.RolloverButton createRolloverButton(java.lang.String buttonPrefix)
          Creates a RolloverButton using jEdit's property list.
 org.gjt.sp.jedit.gui.RolloverButton createRolloverButton(java.lang.String buttonImageIn, java.lang.String noImageTextIn, java.lang.String toolTipTextIn)
          Creates a RolloverButton with explicit settings passed in and adds it to the ButtonPanel
 RolloverOnOffButton createRolloverOnOffButton(java.lang.String buttonPrefix)
          Creates a RolloverOnOffButton using jEdit's property list.
 RolloverOnOffButton createRolloverOnOffButton(java.lang.String buttonImageOnIn, java.lang.String buttonImageOffIn, java.lang.String noImageTextOnIn, java.lang.String noImageTextOffIn, java.lang.String toolTipTextOnIn, java.lang.String toolTipTextOffIn)
          Creates a RolloverOnOffButton with explicit settings passed in and adds it to the ButtonPanel
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonPanel

public ButtonPanel()
Creates an empty ButtonPanel in a horizontal orientation


ButtonPanel

public ButtonPanel(int axisIn)
Creates an empty ButtonPanel in a particular orientation

Parameters:
axisIn - The orientation of the ButtonPanel. Valid values are javax.swing.BoxLayout.X_AXIS and javax.swing.BoxLayout.Y_AXIS

ButtonPanel

public ButtonPanel(boolean isVerticalAlign)
Creates an empty ButtonPanel, oriented properly for either a Vertically aligned plugin (floating or docked to the left or right) or a horizontally alighed plugin (docked to the top or bottom)

Parameters:
isVerticalAlign - true if aligned vertically, false if aligned horizontally
Method Detail

createButton

public org.gjt.sp.jedit.gui.RolloverButton createButton(java.lang.String buttonPrefix)
Creates a RolloverButton using jEdit's property list. Properties used with this function are defined in the ProCol.props file

Parameters:
buttonPrefix - The prefix for the button properties
Returns:
The button created

createButton

public org.gjt.sp.jedit.gui.RolloverButton createButton(java.lang.String buttonImageIn,
                                                        java.lang.String noImageTextIn,
                                                        java.lang.String toolTipTextIn)
Creates a RolloverButton with explicit settings passed in and adds it to the ButtonPanel

Parameters:
buttonImageIn - Image to display with the button
noImageTextIn - Text to display with the button, if there is no image to display
toolTipTextIn - Tooltip to display with the button
Returns:
The button created

createRolloverButton

public org.gjt.sp.jedit.gui.RolloverButton createRolloverButton(java.lang.String buttonPrefix)
Creates a RolloverButton using jEdit's property list. Properties used with this function are defined in the ProCol.props file

Parameters:
buttonPrefix - The prefix for the button properties
Returns:
The button created

createRolloverButton

public org.gjt.sp.jedit.gui.RolloverButton createRolloverButton(java.lang.String buttonImageIn,
                                                                java.lang.String noImageTextIn,
                                                                java.lang.String toolTipTextIn)
Creates a RolloverButton with explicit settings passed in and adds it to the ButtonPanel

Parameters:
buttonImageIn - Image to display with the button
noImageTextIn - Text to display with the button, if there is no image to display
toolTipTextIn - Tooltip to display with the button
Returns:
The button created

createRolloverOnOffButton

public RolloverOnOffButton createRolloverOnOffButton(java.lang.String buttonImageOnIn,
                                                     java.lang.String buttonImageOffIn,
                                                     java.lang.String noImageTextOnIn,
                                                     java.lang.String noImageTextOffIn,
                                                     java.lang.String toolTipTextOnIn,
                                                     java.lang.String toolTipTextOffIn)
Creates a RolloverOnOffButton with explicit settings passed in and adds it to the ButtonPanel

Parameters:
buttonImageOnIn - Image to display when the button is in the on state
buttonImageOffIn - Image to display when the button is in the off state
noImageTextOnIn - Text to display when the button is in the on state, if there is no image to display
noImageTextOffIn - Text to display when the button is in the off state, if there is no image to display
toolTipTextOnIn - Tooltip to display when the button is in the on state
toolTipTextOffIn - Tooltip to display when the button is in the off state
Returns:
The button created

createRolloverOnOffButton

public RolloverOnOffButton createRolloverOnOffButton(java.lang.String buttonPrefix)
Creates a RolloverOnOffButton using jEdit's property list. Properties used with this function are defined in the ProCol.props file

Parameters:
buttonPrefix - The prefix for the button properties
Returns:
The button created

createRigidSpace

public void createRigidSpace()
Creates a rigid spacer of the default size


createRigidSpace

public void createRigidSpace(int space)
Creates a rigid spacer of a specified size

Parameters:
space - The number of pixels to make the rigid space

createExpandableSpace

public void createExpandableSpace()
Creates an expandable spacer of the default size


createExpandableSpace

public void createExpandableSpace(int space)
Creates an expandable spacer of a specified size

Parameters:
space - The number of pixels to make the expandable space

createExpandableSection

public void createExpandableSection()
Creates a section which expands to fill available space