Package com.ribs
Class RJPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ribs.RJPanel
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,Accessible
- Direct Known Subclasses:
AnimScript.AnimScriptUI
,DocumentTool.PageSizeView
,Gallery.GalleryUI
,LabelTool.LabelToolUI
,RBTester.GlassPane
,RJSwitchPane
,ShapeFillsShadow.OffsetPanel
This class is the root of all Rib files and the unified point of access for all of its child components (and,
optionally, it's window).
Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill <info@reportmill.com>.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinder
(RBListBinder aBinder) Adds a binder to the panel.boolean
Returns whether a given component matches a named component.Get the specific child component with the given name.getBinder
(int anIndex) Returns the specific binder at the given index.Returns the named binder for this panel.int
Returns the number of binders for this panel.getBooleanValue
(Object anObj) Unified GetValue to get a Boolean value from a given component.getBooleanValue
(String aName) Unified GetValue to get a Boolean value from a named component.boolean
getBoolValue
(Object anObj) Unified GetValue to get a boolean value from a given component.boolean
getBoolValue
(String aName) Unified GetValue to get a boolean value from a named component.Returns the named child component as a JButton (convenience).getButtonGroup
(String aName) Return the button group in this table for the given name (creating if needed).Returns the Map of all named buttonGroups in the panel.getClippedSize
(int w, int h) A utility method to constrain values to within min & max valuesgetColorValue
(Object anObj) Unified accessor to return the color from a given component.getColorValue
(String aName) Unified accessor to return the color from a given named component.getComboBox
(String aName) Returns the named child component as a JComboBox (convenience).getComponent
(String aName) Returns the named child component as a JComponent (convenience).Returns the datasource for the panel.float
getFloatValue
(Object anObj) Unified GetValue to get a float value from a given component.float
getFloatValue
(String aName) Unified GetValue to get a float value from a named component.int
getIntValue
(Object anObj) Unified GetValue to get an int value from a given component.int
getIntValue
(String aName) Unified GetValue to get an int value from a named component.Returns the named child component as a JLabel (convenience).Returns this panels layout manager as an RJLayout.Returns the named child component as a JList (convenience).Returns the top level component of the rib file that contained this component.Overriden to handle max the max size, if it's been set.Returns the named child component as a JMenu (convenience).getMenuItem
(String aName) Returns the named child component as a JMenuItem (convenience).Overriden to handle max the min size, if it's been set.getOwner()
Returns the object that loaded this component.Returns the named child component as a JPanel (convenience).Overrides component method to indicate that preferred size is current size.getProgressBar
(String aName) Returns the named child component as a JProgressBar (convenience).getScrollPane
(String aName) Returns the named child component as a JScrollPane (convenience).Returns the named child component as a JSlider (convenience).getStringValue
(Object anObj) Unified GetValue to get a String value from a given component.getStringValue
(String aName) Unified GetValue to get a String value from a named component.getTabbedPane
(String aName) Returns the named child component as a JTabbedPane (convenience).Returns the named child component as a JTable (convenience).getTextArea
(String aName) Returns the named child component as a JTextArea (convenience).getTextField
(String aName) Returns the named child component as a JTextField (convenience).getToggleButton
(String aName) Returns the named child component as a JToggleButton (convenience).Returns the named child component as a JTree (convenience).Unified GetValue to get an Object value from a given component.Unified GetValue to get an Object value from a named component.boolean
getValueIsAdjusting
(Object anObj) Unified GetValueIsAdjusting to get isAdjusting state from a given component.boolean
getValueIsAdjusting
(String aName) Unified GetValueIsAdjusting to get isAdjusting state from a named component.Returns the window associated with this panel, creating it if necessary.Returns the class of the window associated with this panel.Returns the class name of the window associated with this panel.Returns the name of the default button associated with this panel's window.boolean
Obsolete - make this go soon!.Returns the menu bar associated with this panel's window.Returns the owner-window or parent-window associated with this panel's window, such that this panel's window is the child of that window.Returns the title of the window associated with this panel.void
Call this method to set up a listener which will honor the min & max sizes.boolean
Returns whether the window associated with this panel is always on top.boolean
Returns whether the window associated with this panel will hide on deactivate.boolean
Returns the modal mode of the window associated with this panel.boolean
Returns whether the window associated with this panel is resizable.boolean
Returns whether window associated with this panel is visible.pack()
This method calculates how much bigger the panel needs to be to accommodate the preferred size of all UI components and grows the panel and all controls proportionally by that amount.void
removeBinder
(RBListBinder aBinder) Removes a binder from the panel.void
setBounds
(int x, int y, int w, int h) Overridden to handle constraintsvoid
Overridden to handle constraintsvoid
setDataSource
(RMDataSource aDataSource) Sets the datasource for the panel.void
setEnabled
(boolean aFlag) Overrides JComponent method to propagate to all children (which is a quick way to disable an entire panel).void
setEnabled
(String aName, boolean aValue) Calls set enabled on named child.void
setEnabled
(JComponent aComponent, boolean aValue) Calls set enabled on referenced child.void
Sets the top level component of the rib file that contained this component.void
Overridden so that panel keeps private copies of min/max safely around.void
Overridden so that panel keeps private copies of min/max safely around.void
Sets the object that loaded this component.void
Overridden to handle constraintsvoid
Unified setValue to set a boolean value in a given component.void
Unified setValue to set an Object value in a given component.void
Unified setValue to set an int value in a given component.void
Unified setValue to set a Color value in a given component.void
Unified setValue to set a Boolean value in a given component.void
Unified setValue to set an Object value in a given component.void
Unified setValue to set a String value in a given component.void
Unified setValue to set a boolean value in a named component.void
Unified setValue to set a float value in a named component.void
Unified setValue to set an int value in a named component.void
Unified setValue to set a Color value in a named component.void
Unified setValue to set a Boolean value in a named component.void
Unified setValue to set an Object value in a named component.void
Unified setValue to set a String value in a named component.void
setWindowAlwaysOnTop
(boolean aValue) Sets whether the window associated with this panel is always on top.void
setWindowClassName
(String aName) Sets the class name of the window associated with this panel.void
setWindowDefaultButton
(String aName) Sets the name of the default button associated with this panel's window.void
setWindowHideOnDeactivate
(boolean aValue) Sets whether the window associated with this panel will hide on deacativate.void
setWindowMenuBar
(JMenuBar aMenuBar) Sets the menu bar associated with this panel's window.void
setWindowModal
(boolean aValue) Sets the modal mode of the window associated with this panel (defaults to false).void
setWindowOwner
(Window aWindowOwner) Sets the owner-window/parent-window associated with this panel's window.void
setWindowResizable
(boolean aValue) Sets whether the window associated with this panel is resizable (default to true).void
setWindowTitle
(String aValue) Sets the title of the window associated with this panel.void
setWindowVisible
(boolean aValue) This method sets the window associated with this panel to be visible or invisible.void
setWindowVisible
(int x, int y, byte aCorner, String fsaveName) This method set the window associated with this panel to be visible at some given x and y away from a given corner.void
This method disposes the window associated with this panel.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
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, getNextFocusableComponent, getPopupLocation, 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, paintBorder, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, 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, 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, setLayout, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
RJPanel
public RJPanel()Creates a new RJPanel.
-
-
Method Details
-
getOwner
Returns the object that loaded this component. -
setOwner
Sets the object that loaded this component. -
getMaster
Returns the top level component of the rib file that contained this component. -
setMaster
Sets the top level component of the rib file that contained this component. -
get
Get the specific child component with the given name. -
getComponent
Returns the named child component as a JComponent (convenience). -
getPanel
Returns the named child component as a JPanel (convenience). -
getButton
Returns the named child component as a JButton (convenience). -
getComboBox
Returns the named child component as a JComboBox (convenience). -
getLabel
Returns the named child component as a JLabel (convenience). -
getList
Returns the named child component as a JList (convenience). -
getMenu
Returns the named child component as a JMenu (convenience). -
getMenuItem
Returns the named child component as a JMenuItem (convenience). -
getProgressBar
Returns the named child component as a JProgressBar (convenience). -
getSlider
Returns the named child component as a JSlider (convenience). -
getScrollPane
Returns the named child component as a JScrollPane (convenience). -
getTabbedPane
Returns the named child component as a JTabbedPane (convenience). -
getTable
Returns the named child component as a JTable (convenience). -
getTextField
Returns the named child component as a JTextField (convenience). -
getTextArea
Returns the named child component as a JTextArea (convenience). -
getToggleButton
Returns the named child component as a JToggleButton (convenience). -
getTree
Returns the named child component as a JTree (convenience). -
getLayoutRB
Returns this panels layout manager as an RJLayout. -
getBinderCount
public int getBinderCount()Returns the number of binders for this panel. -
getBinder
Returns the specific binder at the given index. -
getBinder
Returns the named binder for this panel. -
addBinder
Adds a binder to the panel. -
removeBinder
Removes a binder from the panel. -
getButtonGroup
Return the button group in this table for the given name (creating if needed). -
getButtonGroups
Returns the Map of all named buttonGroups in the panel. -
equals
Returns whether a given component matches a named component. -
getValue
Unified GetValue to get an Object value from a named component. -
getValue
Unified GetValue to get an Object value from a given component. -
setValue
Unified setValue to set an Object value in a named component. -
setValue
Unified setValue to set an Object value in a given component. -
getStringValue
Unified GetValue to get a String value from a named component. -
getStringValue
Unified GetValue to get a String value from a given component. -
setValue
Unified setValue to set a String value in a named component. -
setValue
Unified setValue to set a String value in a given component. -
getBooleanValue
Unified GetValue to get a Boolean value from a named component. -
getBooleanValue
Unified GetValue to get a Boolean value from a given component. -
setValue
Unified setValue to set a Boolean value in a named component. -
setValue
Unified setValue to set a Boolean value in a given component. -
getBoolValue
Unified GetValue to get a boolean value from a named component. -
getBoolValue
Unified GetValue to get a boolean value from a given component. -
setValue
Unified setValue to set a boolean value in a named component. -
setValue
Unified setValue to set a boolean value in a given component. -
getIntValue
Unified GetValue to get an int value from a named component. -
getIntValue
Unified GetValue to get an int value from a given component. -
setValue
Unified setValue to set an int value in a named component. -
setValue
Unified setValue to set an int value in a given component. -
getFloatValue
Unified GetValue to get a float value from a named component. -
getFloatValue
Unified GetValue to get a float value from a given component. -
setValue
Unified setValue to set a float value in a named component. -
setValue
Unified setValue to set an Object value in a given component. -
getColorValue
Unified accessor to return the color from a given named component. -
getColorValue
Unified accessor to return the color from a given component. -
setValue
Unified setValue to set a Color value in a named component. -
setValue
Unified setValue to set a Color value in a given component. -
getValueIsAdjusting
Unified GetValueIsAdjusting to get isAdjusting state from a named component. -
getValueIsAdjusting
Unified GetValueIsAdjusting to get isAdjusting state from a given component. -
setEnabled
Calls set enabled on named child. -
setEnabled
Calls set enabled on referenced child. -
setEnabled
public void setEnabled(boolean aFlag) Overrides JComponent method to propagate to all children (which is a quick way to disable an entire panel).- Overrides:
setEnabled
in classJComponent
-
pack
This method calculates how much bigger the panel needs to be to accommodate the preferred size of all UI components and grows the panel and all controls proportionally by that amount. -
getPreferredSize
Overrides component method to indicate that preferred size is current size.- Overrides:
getPreferredSize
in classJComponent
-
getMaximumSize
Overriden to handle max the max size, if it's been set.- Overrides:
getMaximumSize
in classJComponent
-
getMinimumSize
Overriden to handle max the min size, if it's been set.- Overrides:
getMinimumSize
in classJComponent
-
setMinimumSize
Overridden so that panel keeps private copies of min/max safely around.- Overrides:
setMinimumSize
in classJComponent
-
setMaximumSize
Overridden so that panel keeps private copies of min/max safely around.- Overrides:
setMaximumSize
in classJComponent
-
getClippedSize
A utility method to constrain values to within min & max values -
setBounds
Overridden to handle constraints -
setBounds
public void setBounds(int x, int y, int w, int h) Overridden to handle constraints -
setSize
Overridden to handle constraints -
installResizeHandler
public void installResizeHandler()Call this method to set up a listener which will honor the min & max sizes. -
getWindow
Returns the window associated with this panel, creating it if necessary. -
getWindowClassName
Returns the class name of the window associated with this panel. -
setWindowClassName
Sets the class name of the window associated with this panel. -
getWindowClass
Returns the class of the window associated with this panel. -
getWindowTitle
Returns the title of the window associated with this panel. -
setWindowTitle
Sets the title of the window associated with this panel. -
isWindowResizable
public boolean isWindowResizable()Returns whether the window associated with this panel is resizable. -
setWindowResizable
public void setWindowResizable(boolean aValue) Sets whether the window associated with this panel is resizable (default to true). -
getWindowMenuBar
Returns the menu bar associated with this panel's window. -
setWindowMenuBar
Sets the menu bar associated with this panel's window. -
isWindowAlwaysOnTop
public boolean isWindowAlwaysOnTop()Returns whether the window associated with this panel is always on top. -
setWindowAlwaysOnTop
public void setWindowAlwaysOnTop(boolean aValue) Sets whether the window associated with this panel is always on top. -
isWindowHideOnDeactivate
public boolean isWindowHideOnDeactivate()Returns whether the window associated with this panel will hide on deactivate. -
setWindowHideOnDeactivate
public void setWindowHideOnDeactivate(boolean aValue) Sets whether the window associated with this panel will hide on deacativate. -
isWindowModal
public boolean isWindowModal()Returns the modal mode of the window associated with this panel. -
setWindowModal
public void setWindowModal(boolean aValue) Sets the modal mode of the window associated with this panel (defaults to false). -
getWindowOwner
Returns the owner-window or parent-window associated with this panel's window, such that this panel's window is the child of that window. This gives the child window the behavior of always floating above the parent, which can be useful for dialogs or inspectors. -
setWindowOwner
Sets the owner-window/parent-window associated with this panel's window. This isn't really supported by Swing, so we blow away the current window and re-create. -
getWindowDefaultButton
Returns the name of the default button associated with this panel's window. -
setWindowDefaultButton
Sets the name of the default button associated with this panel's window. -
isWindowVisible
public boolean isWindowVisible()Returns whether window associated with this panel is visible. -
setWindowVisible
public void setWindowVisible(boolean aValue) This method sets the window associated with this panel to be visible or invisible. -
getWindowIsVisible
public boolean getWindowIsVisible()Obsolete - make this go soon!. -
setWindowVisible
This method set the window associated with this panel to be visible at some given x and y away from a given corner. It also allows you to provide a "frame save name" which causes the frame's location and size to be saved between sessions (in which case it will override the default position provided). -
windowDispose
public void windowDispose()This method disposes the window associated with this panel. -
getDataSource
Returns the datasource for the panel. -
setDataSource
Sets the datasource for the panel.
-