swingwtx.swing
Class JPanel

java.lang.Object
  extended byswingwt.awt.Component
      extended byswingwt.awt.Container
          extended byswingwtx.swing.JComponent
              extended byswingwtx.swing.JPanel
All Implemented Interfaces:
ImageObserver, MenuContainer
Direct Known Subclasses:
Box, Box.Filler, JFileChooser, JLayeredPane, JLookupPopup, JOptionPane, JRootPane, JScrollPane, JSpinner, JViewport, Panel, ValidatableComponent

public class JPanel
extends JComponent


Nested Class Summary
 
Nested classes inherited from class swingwtx.swing.JComponent
JComponent.InternalFrameSelectionListener
 
Field Summary
protected  boolean opaque
           
protected  org.eclipse.swt.widgets.Composite ppeer
          The panel's peer
 
Fields inherited from class swingwtx.swing.JComponent
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap
 
Fields inherited from class swingwt.awt.Container
composite, comps, containerListeners, layout, queuedValidateRequest
 
Fields inherited from class swingwt.awt.Component
actionCommand, actionListeners, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, peer, pEnabled, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT
 
Fields inherited from interface swingwt.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JPanel()
          Creates a new JPanel
JPanel(boolean isDoubleBuffered)
          Creates a new JPanel with the specified buffering scheme
JPanel(LayoutManager layout)
          Creates a new JPanel with the specified layout
JPanel(LayoutManager2 layout)
          Creates a new JPanel with the specified layout
JPanel(LayoutManager2 layout, boolean isDoubleBuffered)
          Creates a new JPanel with the specified layout and buffering scheme
JPanel(LayoutManager layout, boolean isDoubleBuffered)
          Creates a new JPanel with the specified layout and buffering scheme
 
Method Summary
protected  Dimension calculatePreferredSize()
          Overriden to calculate non-realised preferred size.
 int getHeight()
          Returns the height of the peer
 Dimension getSize()
          Return how large this panel would like to be if it's inside a ScrollPane, rather than how large it actually is.
 int getWidth()
          Returns the width of the peer
 void setBorder(Border b)
          Sets the border for the Panel
 void setSwingWTParent(Container parent)
          Callback for when this is added to a Container to create the peer and load cached values.
 
Methods inherited from class swingwtx.swing.JComponent
add, add, add, add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, dispose, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled
 
Methods inherited from class swingwt.awt.Container
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComponents, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate
 
Methods inherited from class swingwt.awt.Component
add, addActionListener, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getActionCommand, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSWTPeer, getToolkit, getToolTipText, getTreeLock, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isEnabled, isFocusable, isMinimumSizeSet, isShowing, isVisible, processActionEvent, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerActionEvents, registerComponentEvents, registerEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeActionListener, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, requestFocus, setActionCommand, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setCachedProperties, setComponentOrientation, setComponentRemoved, setCursor, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setToolTipText, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ppeer

protected org.eclipse.swt.widgets.Composite ppeer
The panel's peer


opaque

protected boolean opaque
Constructor Detail

JPanel

public JPanel()
Creates a new JPanel


JPanel

public JPanel(boolean isDoubleBuffered)
Creates a new JPanel with the specified buffering scheme

Parameters:
isDoubleBuffered - Whether or not to double buffer paint callbacks

JPanel

public JPanel(LayoutManager layout)
Creates a new JPanel with the specified layout

Parameters:
layout - The layout manager to use

JPanel

public JPanel(LayoutManager layout,
              boolean isDoubleBuffered)
Creates a new JPanel with the specified layout and buffering scheme

Parameters:
layout - The layout manager to use
isDoubleBuffered - Whether or not to double buffer paint callbacks

JPanel

public JPanel(LayoutManager2 layout)
Creates a new JPanel with the specified layout

Parameters:
layout - The layout manager to use

JPanel

public JPanel(LayoutManager2 layout,
              boolean isDoubleBuffered)
Creates a new JPanel with the specified layout and buffering scheme

Parameters:
layout - The layout manager to use
isDoubleBuffered - Whether or not to double buffer paint callbacks
Method Detail

calculatePreferredSize

protected Dimension calculatePreferredSize()
Overriden to calculate non-realised preferred size.

Overrides:
calculatePreferredSize in class Component

setSwingWTParent

public void setSwingWTParent(Container parent)
                      throws java.lang.Exception
Callback for when this is added to a Container to create the peer and load cached values.

Overrides:
setSwingWTParent in class JComponent
Throws:
java.lang.Exception

setBorder

public void setBorder(Border b)
Sets the border for the Panel

Overrides:
setBorder in class JComponent
Parameters:
b - The new border

getSize

public Dimension getSize()
Return how large this panel would like to be if it's inside a ScrollPane, rather than how large it actually is. This is used by layout managers when determining how to layout the components. If you need the actual size of a JPanel in a scroll pane, use getPeerSize() which always return the correct values.

Overrides:
getSize in class Component

getWidth

public int getWidth()
Returns the width of the peer

Overrides:
getWidth in class Component
Returns:
the width

getHeight

public int getHeight()
Returns the height of the peer

Overrides:
getHeight in class Component
Returns:
the height