Package com.ribs

Class RJPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
AnimScript.AnimScriptUI, DocumentTool.PageSizeView, Gallery.GalleryUI, LabelTool.LabelToolUI, RBTester.GlassPane, RJSwitchPane, ShapeFillsShadow.OffsetPanel

public class RJPanel extends JPanel
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:
  • Constructor Details

    • RJPanel

      public RJPanel()
      Creates a new RJPanel.
  • Method Details

    • getOwner

      public Object getOwner()
      Returns the object that loaded this component.
    • setOwner

      public void setOwner(Object anOwner)
      Sets the object that loaded this component.
    • getMaster

      public RJPanel getMaster()
      Returns the top level component of the rib file that contained this component.
    • setMaster

      public void setMaster(RJPanel aMaster)
      Sets the top level component of the rib file that contained this component.
    • get

      public JComponent get(String aName)
      Get the specific child component with the given name.
    • getComponent

      public JComponent getComponent(String aName)
      Returns the named child component as a JComponent (convenience).
    • getPanel

      public RJPanel getPanel(String aName)
      Returns the named child component as a JPanel (convenience).
    • getButton

      public JButton getButton(String aName)
      Returns the named child component as a JButton (convenience).
    • getComboBox

      public JComboBox getComboBox(String aName)
      Returns the named child component as a JComboBox (convenience).
    • getLabel

      public JLabel getLabel(String aName)
      Returns the named child component as a JLabel (convenience).
    • getList

      public JList getList(String aName)
      Returns the named child component as a JList (convenience).
    • getMenu

      public JMenu getMenu(String aName)
      Returns the named child component as a JMenu (convenience).
    • getMenuItem

      public JMenuItem getMenuItem(String aName)
      Returns the named child component as a JMenuItem (convenience).
    • getProgressBar

      public JProgressBar getProgressBar(String aName)
      Returns the named child component as a JProgressBar (convenience).
    • getSlider

      public JSlider getSlider(String aName)
      Returns the named child component as a JSlider (convenience).
    • getScrollPane

      public JScrollPane getScrollPane(String aName)
      Returns the named child component as a JScrollPane (convenience).
    • getTabbedPane

      public JTabbedPane getTabbedPane(String aName)
      Returns the named child component as a JTabbedPane (convenience).
    • getTable

      public JTable getTable(String aName)
      Returns the named child component as a JTable (convenience).
    • getTextField

      public JTextField getTextField(String aName)
      Returns the named child component as a JTextField (convenience).
    • getTextArea

      public JTextArea getTextArea(String aName)
      Returns the named child component as a JTextArea (convenience).
    • getToggleButton

      public JToggleButton getToggleButton(String aName)
      Returns the named child component as a JToggleButton (convenience).
    • getTree

      public JTree getTree(String aName)
      Returns the named child component as a JTree (convenience).
    • getLayoutRB

      public RJLayout getLayoutRB()
      Returns this panels layout manager as an RJLayout.
    • getBinderCount

      public int getBinderCount()
      Returns the number of binders for this panel.
    • getBinder

      public RBListBinder getBinder(int anIndex)
      Returns the specific binder at the given index.
    • getBinder

      public RBListBinder getBinder(String aName)
      Returns the named binder for this panel.
    • addBinder

      public void addBinder(RBListBinder aBinder)
      Adds a binder to the panel.
    • removeBinder

      public void removeBinder(RBListBinder aBinder)
      Removes a binder from the panel.
    • getButtonGroup

      public ButtonGroup getButtonGroup(String aName)
      Return the button group in this table for the given name (creating if needed).
    • getButtonGroups

      public Map getButtonGroups()
      Returns the Map of all named buttonGroups in the panel.
    • equals

      public boolean equals(Object anObj, String aName)
      Returns whether a given component matches a named component.
    • getValue

      public Object getValue(String aName)
      Unified GetValue to get an Object value from a named component.
    • getValue

      public Object getValue(Object anObj)
      Unified GetValue to get an Object value from a given component.
    • setValue

      public void setValue(String aName, Object aValue)
      Unified setValue to set an Object value in a named component.
    • setValue

      public void setValue(Object anObj, Object aValue)
      Unified setValue to set an Object value in a given component.
    • getStringValue

      public String getStringValue(String aName)
      Unified GetValue to get a String value from a named component.
    • getStringValue

      public String getStringValue(Object anObj)
      Unified GetValue to get a String value from a given component.
    • setValue

      public void setValue(String aName, String aValue)
      Unified setValue to set a String value in a named component.
    • setValue

      public void setValue(Object anObj, String aValue)
      Unified setValue to set a String value in a given component.
    • getBooleanValue

      public Boolean getBooleanValue(String aName)
      Unified GetValue to get a Boolean value from a named component.
    • getBooleanValue

      public Boolean getBooleanValue(Object anObj)
      Unified GetValue to get a Boolean value from a given component.
    • setValue

      public void setValue(String aName, Boolean aValue)
      Unified setValue to set a Boolean value in a named component.
    • setValue

      public void setValue(Object anObj, Boolean aValue)
      Unified setValue to set a Boolean value in a given component.
    • getBoolValue

      public boolean getBoolValue(String aName)
      Unified GetValue to get a boolean value from a named component.
    • getBoolValue

      public boolean getBoolValue(Object anObj)
      Unified GetValue to get a boolean value from a given component.
    • setValue

      public void setValue(String aName, boolean aValue)
      Unified setValue to set a boolean value in a named component.
    • setValue

      public void setValue(Object anObj, boolean aValue)
      Unified setValue to set a boolean value in a given component.
    • getIntValue

      public int getIntValue(String aName)
      Unified GetValue to get an int value from a named component.
    • getIntValue

      public int getIntValue(Object anObj)
      Unified GetValue to get an int value from a given component.
    • setValue

      public void setValue(String aName, int aValue)
      Unified setValue to set an int value in a named component.
    • setValue

      public void setValue(Object anObj, int aValue)
      Unified setValue to set an int value in a given component.
    • getFloatValue

      public float getFloatValue(String aName)
      Unified GetValue to get a float value from a named component.
    • getFloatValue

      public float getFloatValue(Object anObj)
      Unified GetValue to get a float value from a given component.
    • setValue

      public void setValue(String aName, float aValue)
      Unified setValue to set a float value in a named component.
    • setValue

      public void setValue(Object anObj, float aValue)
      Unified setValue to set an Object value in a given component.
    • getColorValue

      public Color getColorValue(String aName)
      Unified accessor to return the color from a given named component.
    • getColorValue

      public Color getColorValue(Object anObj)
      Unified accessor to return the color from a given component.
    • setValue

      public void setValue(String aName, Color aValue)
      Unified setValue to set a Color value in a named component.
    • setValue

      public void setValue(Object anObj, Color aValue)
      Unified setValue to set a Color value in a given component.
    • getValueIsAdjusting

      public boolean getValueIsAdjusting(String aName)
      Unified GetValueIsAdjusting to get isAdjusting state from a named component.
    • getValueIsAdjusting

      public boolean getValueIsAdjusting(Object anObj)
      Unified GetValueIsAdjusting to get isAdjusting state from a given component.
    • setEnabled

      public void setEnabled(String aName, boolean aValue)
      Calls set enabled on named child.
    • setEnabled

      public void setEnabled(JComponent aComponent, boolean aValue)
      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 class JComponent
    • pack

      public RJPanel 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

      public Dimension getPreferredSize()
      Overrides component method to indicate that preferred size is current size.
      Overrides:
      getPreferredSize in class JComponent
    • getMaximumSize

      public Dimension getMaximumSize()
      Overriden to handle max the max size, if it's been set.
      Overrides:
      getMaximumSize in class JComponent
    • getMinimumSize

      public Dimension getMinimumSize()
      Overriden to handle max the min size, if it's been set.
      Overrides:
      getMinimumSize in class JComponent
    • setMinimumSize

      public void setMinimumSize(Dimension d)
      Overridden so that panel keeps private copies of min/max safely around.
      Overrides:
      setMinimumSize in class JComponent
    • setMaximumSize

      public void setMaximumSize(Dimension d)
      Overridden so that panel keeps private copies of min/max safely around.
      Overrides:
      setMaximumSize in class JComponent
    • getClippedSize

      public Dimension getClippedSize(int w, int h)
      A utility method to constrain values to within min & max values
    • setBounds

      public void setBounds(Rectangle r)
      Overridden to handle constraints
      Overrides:
      setBounds in class Component
    • setBounds

      public void setBounds(int x, int y, int w, int h)
      Overridden to handle constraints
      Overrides:
      setBounds in class Component
    • setSize

      public void setSize(Dimension d)
      Overridden to handle constraints
      Overrides:
      setSize in class Component
    • installResizeHandler

      public void installResizeHandler()
      Call this method to set up a listener which will honor the min & max sizes.
    • getWindow

      public Window getWindow()
      Returns the window associated with this panel, creating it if necessary.
    • getWindowClassName

      public String getWindowClassName()
      Returns the class name of the window associated with this panel.
    • setWindowClassName

      public void setWindowClassName(String aName)
      Sets the class name of the window associated with this panel.
    • getWindowClass

      public Class getWindowClass()
      Returns the class of the window associated with this panel.
    • getWindowTitle

      public String getWindowTitle()
      Returns the title of the window associated with this panel.
    • setWindowTitle

      public void setWindowTitle(String aValue)
      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

      public JMenuBar getWindowMenuBar()
      Returns the menu bar associated with this panel's window.
    • setWindowMenuBar

      public void setWindowMenuBar(JMenuBar aMenuBar)
      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

      public Window 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

      public void setWindowOwner(Window aWindowOwner)
      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

      public String getWindowDefaultButton()
      Returns the name of the default button associated with this panel's window.
    • setWindowDefaultButton

      public void setWindowDefaultButton(String aName)
      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

      public 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. 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

      public RMDataSource getDataSource()
      Returns the datasource for the panel.
    • setDataSource

      public void setDataSource(RMDataSource aDataSource)
      Sets the datasource for the panel.