|
Oculus Layout System API Documentation November 25, 2002 |
|||||||||
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 | +--com.oculustech.layout.OculusBox
For a detailed explanation of using the Oculus Layout system, see the docs for OculusLayoutHelper.
OculusBox extends JComponent but only uses OculusLayout as the layout manager. It also implements the OculusLayoutInfo.
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
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 com.oculustech.layout.OculusLayoutInfo |
ALIGNED_COMPONENT_SPACING, ALIGNMENT_SPACE_STRETCHING, CAN_BE_STRETCHED, LOW_PRIORITY_ALIGNMENT_SPACE_STRETCHING, MAX_STRETCHING_PREFERENCE, NO_STRETCH, START_NON_POINT_ALIGNMENT_STRETCHING_HERE, START_NORMAL_STRETCHING, START_STRETCHING_HERE, STRETCH_ONLY_TO_ALIGN, WANT_STRETCHED |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
OculusBox()
Empty constructor. |
|
OculusBox(int axis)
Constructor with set axis. |
|
OculusBox(int axis,
int justification)
Constructor with set axis. |
|
OculusBox(int axis,
int justification,
java.awt.Component heightGuide,
java.awt.Component widthGuide)
Constructor with the given axis, the given stretching, and the given alignment preferences. |
Method Summary | |
java.awt.Component |
add(java.awt.Component c,
int xStretching,
int yStretching)
Adds given component to container with given stretching preferences. |
java.lang.Object |
aggregateDynamicPropertyValues(java.lang.String prop,
java.lang.Object value1,
java.lang.Object value2)
This function is used to aggregate values of the given property when computing the value of accumulated properties. |
static OculusBox |
createHorizontalOculusBox()
Creates an OculusBox that displays its components from top to bottom. |
static OculusBox |
createVerticalOculusBox()
Creates an OculusBox that displays it components from left to right. |
void |
debugOutputNodesDefiningProperty(java.lang.String prop)
Dump this.toString() to System.err for nodes who define given property. |
void |
dynamicallyAccumulatedPropertyChanged(java.lang.String prop)
Called to notify parents when one of their descendants changes the accumulated property. |
void |
dynamicallyInheritedPropertyChanged(java.lang.String prop)
Called to notify children when one of their ancestors changes a inherited property. |
java.lang.Object |
getDynamicallyAccumulatedProperty(java.lang.String prop)
Get the value of the accumulated property, by starting aggregation from this node and recursing down through its children. |
java.lang.Object |
getDynamicallyAccumulatedPropertyFromRoot(java.lang.String prop)
Get the value of the accumulated property as seen from the root of the tree. |
java.lang.Object |
getDynamicallyInheritedProperty(java.lang.String prop)
Gets the given inherited property starting at this node and recursing up through the parents. |
DynamicallyPropertiedComponent |
getDynamicallyPropertiedChild(int index)
Return a specific DynamicallyPropertiedComponent child |
int |
getDynamicallyPropertiedChildrenCount()
Return the number of DynamicallyPropertiedComponent children |
DynamicallyPropertiedComponent |
getDynamicallyPropertiedParent()
Return the parent DynamicallyPropertiedComponent |
DynamicallyPropertiedComponent |
getDynamicallyPropertiedRoot()
Return the root of the DynamicallyPropertiedComponent tree |
int |
getInterComponentSpacing()
Returns this box's intercomponent spacing. |
int |
getJustification()
Gets the justification for this box |
java.lang.Object |
getLocalDynamicallyAccumulatedProperty(java.lang.String prop)
Get the value of the dynamically accumulated property of the given name that was set on this node. |
java.lang.Object |
getLocalDynamicallyInheritedProperty(java.lang.String prop)
Get the value of the inherited property of the given name that was set on this node. |
int |
getNestingLevel()
Returns the depth of this box in a tree of nested OculusBoxes. |
int |
getNonce()
Returns an arbitrary, unique number identifying this OculusBox instance. |
int |
getOrientation()
Get the orientation for this box |
java.awt.Component |
getSameHeightAs()
Gets the component whose height is being matched. |
java.awt.Component |
getSameWidthAs()
Gets the component whose height is being matched. |
int |
getXPreference()
Gets the horizontal preference according to one of the fields. |
int |
getYPreference()
Gets the vertical preference according to one of the fields. |
void |
setDebugOutStream(java.io.PrintStream x)
Sets the PrintStream to output debugging information to. |
void |
setDynamicallyAccumulatedProperty(java.lang.String prop,
java.lang.Object value)
Set the given accumulated property to the given value at this node. |
void |
setDynamicallyInheritedProperty(java.lang.String prop,
java.lang.Object value)
Sets the given inherited property to the given value at this node, and then notifies the children of the change via their dynamicallyInheritedPropertyChanged() method. |
void |
setInterComponentSpacing(int icspacing)
Sets this box's intercomponent spacing. |
void |
setJustification(int justification)
Sets the justification for this box |
void |
setOrientation(int orientation)
Sets the orientation for this box |
void |
setSameHeightAs(java.awt.Component c)
|
void |
setSameWidthAs(java.awt.Component c)
|
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
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, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, 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, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OculusBox()
axis
- either OculusLayout.HORIZONTAL or
OculusLayout.VERTICAL valuepublic OculusBox(int axis)
axis
- OculusLayout.HORIZONTAL or Oculus.VERTICAL values.public OculusBox(int axis, int justification)
axis
- OculusLayout.HORIZONTAL or Oculus.VERTICAL values.public OculusBox(int axis, int justification, java.awt.Component heightGuide, java.awt.Component widthGuide)
axis
- either OculusLayout.HORIZONTAL or
OculusLayout.VERTICAL valuejustification
- one of OculusLayout.JUSTIFY_LEFT, OculusLayout.JUSTIFY_CENTER,
OculusLayout.JUSTIFY_RIGHT, OculusLayout.JUSTIFY_TOP, or OculusLayout.JUSTIFY_BOTTOM.heightGuide
- The component whose vertical size will be matched.widthGuide
- The component whose horizontal size will be matched.Method Detail |
public int getNonce()
public static OculusBox createHorizontalOculusBox()
public static OculusBox createVerticalOculusBox()
public void setDebugOutStream(java.io.PrintStream x)
public void setOrientation(int orientation)
public void setJustification(int justification)
public int getJustification()
public int getOrientation()
public void setInterComponentSpacing(int icspacing)
public int getInterComponentSpacing()
public int getXPreference()
OculusLayoutInfo
getXPreference
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public int getYPreference()
OculusLayoutInfo
getYPreference
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public void setSameHeightAs(java.awt.Component c)
public java.awt.Component getSameHeightAs()
OculusLayoutInfo
getSameHeightAs
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public void setSameWidthAs(java.awt.Component c)
public java.awt.Component getSameWidthAs()
OculusLayoutInfo
getSameWidthAs
in interface OculusLayoutInfo
com.oculustech.layout.OculusLayoutInfo
public int getNestingLevel()
public java.awt.Component add(java.awt.Component c, int xStretching, int yStretching)
public void dynamicallyAccumulatedPropertyChanged(java.lang.String prop)
DynamicallyPropertiedComponent
dynamicallyAccumulatedPropertyChanged
in interface DynamicallyPropertiedComponent
public DynamicallyPropertiedComponent getDynamicallyPropertiedParent()
DynamicallyPropertiedComponent
getDynamicallyPropertiedParent
in interface DynamicallyPropertiedComponent
public int getDynamicallyPropertiedChildrenCount()
DynamicallyPropertiedComponent
getDynamicallyPropertiedChildrenCount
in interface DynamicallyPropertiedComponent
public DynamicallyPropertiedComponent getDynamicallyPropertiedChild(int index)
DynamicallyPropertiedComponent
getDynamicallyPropertiedChild
in interface DynamicallyPropertiedComponent
public DynamicallyPropertiedComponent getDynamicallyPropertiedRoot()
DynamicallyPropertiedComponent
getDynamicallyPropertiedRoot
in interface DynamicallyPropertiedComponent
public void setDynamicallyAccumulatedProperty(java.lang.String prop, java.lang.Object value)
DynamicallyPropertiedComponent
setDynamicallyAccumulatedProperty
in interface DynamicallyPropertiedComponent
public java.lang.Object getDynamicallyAccumulatedProperty(java.lang.String prop)
DynamicallyPropertiedComponent
getDynamicallyAccumulatedProperty
in interface DynamicallyPropertiedComponent
public java.lang.Object getDynamicallyAccumulatedPropertyFromRoot(java.lang.String prop)
DynamicallyPropertiedComponent
getDynamicallyAccumulatedPropertyFromRoot
in interface DynamicallyPropertiedComponent
public java.lang.Object getLocalDynamicallyAccumulatedProperty(java.lang.String prop)
DynamicallyPropertiedComponent
getLocalDynamicallyAccumulatedProperty
in interface DynamicallyPropertiedComponent
public java.lang.Object aggregateDynamicPropertyValues(java.lang.String prop, java.lang.Object value1, java.lang.Object value2)
DynamicallyPropertiedComponent
aggregateDynamicPropertyValues
in interface DynamicallyPropertiedComponent
public void setDynamicallyInheritedProperty(java.lang.String prop, java.lang.Object value)
DynamicallyPropertiedComponent
setDynamicallyInheritedProperty
in interface DynamicallyPropertiedComponent
public java.lang.Object getDynamicallyInheritedProperty(java.lang.String prop)
DynamicallyPropertiedComponent
getDynamicallyInheritedProperty
in interface DynamicallyPropertiedComponent
public java.lang.Object getLocalDynamicallyInheritedProperty(java.lang.String prop)
DynamicallyPropertiedComponent
getLocalDynamicallyInheritedProperty
in interface DynamicallyPropertiedComponent
public void dynamicallyInheritedPropertyChanged(java.lang.String prop)
DynamicallyPropertiedComponent
dynamicallyInheritedPropertyChanged
in interface DynamicallyPropertiedComponent
public void debugOutputNodesDefiningProperty(java.lang.String prop)
DynamicallyPropertiedComponent
debugOutputNodesDefiningProperty
in interface DynamicallyPropertiedComponent
|
Oculus Layout System API Documentation November 25, 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |