org.formaria.swing.app
Class InternalFrameWidgetAdapter

java.lang.Object
  extended by org.formaria.aria.WidgetAdapter
      extended by org.formaria.swing.SwingWidgetAdapter
          extended by org.formaria.swing.app.InternalFrameWidgetAdapter

public class InternalFrameWidgetAdapter
extends SwingWidgetAdapter

Adapts the internal frame hierarchy to hide Swing's use of the content pane

Copyright (c) Formaria Ltd., 2008

License: see license.txt


Field Summary
 
Fields inherited from class org.formaria.aria.WidgetAdapter
instance
 
Constructor Summary
protected InternalFrameWidgetAdapter()
           
 
Method Summary
 java.lang.Object getComponent(java.lang.Object container, int i)
          Get the child component at a specific index within the container.
 int getComponentCount(java.lang.Object container)
          Get the number of child components owned by this component, assuming that the component is a container.
 java.lang.Object[] getComponents(java.lang.Object container)
          Get the children.
static WidgetAdapter getInstance()
          Get an instance of this adapter.
 
Methods inherited from class org.formaria.swing.SwingWidgetAdapter
add, add, add, doLayout, getHeight, getLayout, getLocation, getName, getParent, getSize, getWidth, getX, getY, isContainer, isVisible, newPage, remove, removeAll, repaint, requiresParent, setBackground, setBorderStyle, setBorderType, setBounds, setCursor, setEnabled, setFont, setForeground, setHorizontalAlignment, setLayout, setLocation, setMaximumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setSize, setTooltip, setVerticalAlignment, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalFrameWidgetAdapter

protected InternalFrameWidgetAdapter()
Method Detail

getInstance

public static WidgetAdapter getInstance()
Get an instance of this adapter. The adapter is itself stateless so only a single instance of the class is required.

Returns:
The adapter instance

getComponentCount

public int getComponentCount(java.lang.Object container)
Get the number of child components owned by this component, assuming that the component is a container.

Overrides:
getComponentCount in class SwingWidgetAdapter
Parameters:
container - the container instance
Returns:
the number of children

getComponents

public java.lang.Object[] getComponents(java.lang.Object container)
Get the children. Assumes that the object is a container

Overrides:
getComponents in class SwingWidgetAdapter
Parameters:
container - the container instance
Returns:
an array of the child components

getComponent

public java.lang.Object getComponent(java.lang.Object container,
                                     int i)
Get the child component at a specific index within the container. Assumes that the object is a container

Overrides:
getComponent in class SwingWidgetAdapter
Parameters:
container - the container instance
i - the component index
Returns:
an array of the child components