Synergy Home Page

au.edu.swin.synergy.lib
Class BDynamicPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--au.edu.swin.synergy.lib.BDynamicPane

public class BDynamicPane
extends JPanel

This class allows the user to change the size of the pane in the direction specified by the creator. It is intended to be placed in the edges of a BorderLayout.

Author:
Tristan Austin Please complete these missing tags
Copyright Belongs To:
 
See Also:
Serialized Form

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
BDynamicPane(Frame parent, String dividerLocation)
          Sets the location of the divider on the split pane.
 
Method Summary
protected  void addImpl(Component component, Object constraints, int index)
          This redirects added components to the content pane
 String getDividerLocation()
          Gets the divider location of this BSplitPane
 int getStepSize()
          When the dynamic pane is resizing, you can specify the incrementing values so that it snaps to certain sizes when the user releases the mouse.
 boolean isInitialised()
          Indicates whether this dynamic pane has been initialised or not
 void setDividerLocation(String newDividerLocation)
          Sets the location of the divider on the split pane.
 void setDividerSize(int newSize)
          Sets the divider size to the given value
 void setInitialised(boolean initialised)
          Sets whether this dynamic pane has been initialised or not
 void setMaxBottomRight(Point maxBottomRight)
          Sets the maximum bottom and right values the divider can go to
 void setMaxTopLeft(Point maxTopLeft)
          Sets the maximum top and left values the divider can go to
 void setSize(Dimension size)
          This is overriden in order to set the correct constraints whenever the size changes in by any means
 void setSize(int width, int height)
          This is overriden in order to set the correct constraints whenever the size changes in by any means
 void setStepSize(int stepSize)
          When the dynamic pane is resizing, you can specify the incrementing values so that it snaps to certain sizes when the user releases the mouse.
 void setTargetParent(Container targetParent)
          Sets the container which needs to be layed out when the divider moves.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BDynamicPane

public BDynamicPane(Frame parent,
                    String dividerLocation)
Sets the location of the divider on the split pane. It can be on one of the four sides.
Parameters:
newDividerLocation - BorderLayout.EAST BorderLayout.NORTH BorderLayout.SOUTH BorderLayout.WEST Please complete the missing tags for BDynamicPane
Method Detail

getDividerLocation

public String getDividerLocation()
Gets the divider location of this BSplitPane
Parameters:
-  
Returns:
BorderLayout.EAST BorderLayout.NORTH BorderLayout.SOUTH BorderLayout.WEST Please complete the missing tags for getDividerLocation
Pre Condition:
 
Post Condition:
 

setStepSize

public void setStepSize(int stepSize)
When the dynamic pane is resizing, you can specify the incrementing values so that it snaps to certain sizes when the user releases the mouse.
Parameters:
stepSize - The step size in pixels

getStepSize

public int getStepSize()
When the dynamic pane is resizing, you can specify the incrementing values so that it snaps to certain sizes when the user releases the mouse.

This method will get the step size currently set

Parameters:
The - step size in pixels, -1 if none

setMaxTopLeft

public void setMaxTopLeft(Point maxTopLeft)
Sets the maximum top and left values the divider can go to
Parameters:
maxTopLeft - The limits

setMaxBottomRight

public void setMaxBottomRight(Point maxBottomRight)
Sets the maximum bottom and right values the divider can go to
Parameters:
maxTopLeft - The limits

setTargetParent

public void setTargetParent(Container targetParent)
Sets the container which needs to be layed out when the divider moves. If this isn't set, the direct parent of this panel will be used.
Parameters:
targetParent - The container to layout Please complete the missing tags for setTargetParent
Returns:
 
Pre Condition:
 
Post Condition:
 

setInitialised

public void setInitialised(boolean initialised)
Sets whether this dynamic pane has been initialised or not
Parameters:
initialised - True if it has, false otherwise Please complete the missing tags for setInitialised
Returns:
 
Pre Condition:
 
Post Condition:
 

setDividerLocation

public void setDividerLocation(String newDividerLocation)
Sets the location of the divider on the split pane. It can be on one of the four sides.
Parameters:
newDividerLocation - BorderLayout.EAST BorderLayout.NORTH BorderLayout.SOUTH BorderLayout.WEST Please complete the missing tags for setDividerLocation
Returns:
 
Pre Condition:
 
Post Condition:
 

isInitialised

public boolean isInitialised()
Indicates whether this dynamic pane has been initialised or not
Parameters:
-  
Returns:
True if it has, false otherwise Please complete the missing tags for isInitialised
Pre Condition:
 
Post Condition:
 

addImpl

protected void addImpl(Component component,
                       Object constraints,
                       int index)
This redirects added components to the content pane
Parameters:
component - The component being added
constraints - The constraints for the addition
index - The index to add it at Please complete the missing tags for addImpl
Returns:
 
Overrides:
addImpl in class Container
Pre Condition:
 
Post Condition:
 

setDividerSize

public void setDividerSize(int newSize)
Sets the divider size to the given value
Parameters:
newSize - The new size in pixels

setSize

public void setSize(int width,
                    int height)
This is overriden in order to set the correct constraints whenever the size changes in by any means
Parameters:
width - The new width of the pane
height - The new height of the pane
Overrides:
setSize in class Component

setSize

public void setSize(Dimension size)
This is overriden in order to set the correct constraints whenever the size changes in by any means
Parameters:
size - The new size of the pane
Overrides:
setSize in class Component

Synergy Home Page