org.jdesktop.swingx
Class JXApplet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by javax.swing.JApplet
                      extended by org.jdesktop.swingx.JXApplet
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public class JXApplet
extends JApplet

An applet that uses JXRootPane as its root container.

Author:
kschaefer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JApplet
JApplet.AccessibleJApplet
 
Nested classes/interfaces inherited from class java.applet.Applet
Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
Panel.AccessibleAWTPanel
 
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.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
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
JXApplet()
          Creates a the applet instance.
 
Method Summary
protected  JXRootPane createRootPane()
          Overridden to create a JXRootPane and to ensure that the root pane is always created on the Event Dispatch Thread.
protected  JXRootPane createRootPaneSafely()
          This method performs the actual creation of the root pane and is guaranteed to be performed on the Event Dispatch Thread.
 JButton getCancelButton()
          Returns the value of the cancel button property from the underlying JXRootPane.
 JButton getDefaultButton()
          Returns the value of the default button property from the underlying JRootPane.
 JXRootPane getRootPane()
          
 JXStatusBar getStatusBar()
          Returns the value of the status bar property from the underlying JXRootPane.
 JToolBar getToolBar()
          Returns the value of the tool bar property from the underlying JXRootPane.
 void setCancelButton(JButton button)
          Sets the cancel button property on the underlying JXRootPane.
 void setDefaultButton(JButton button)
          Sets the default button property on the underlying JRootPane.
 void setStatusBar(JXStatusBar statusBar)
          Sets the status bar property on the underlying JXRootPane.
 void setToolBar(JToolBar toolBar)
          Sets the tool bar property on the underlying JXRootPane.
 
Methods inherited from class javax.swing.JApplet
addImpl, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.applet.Applet
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JXApplet

public JXApplet()
         throws HeadlessException
Creates a the applet instance.

This constructor sets the component's locale property to the value returned by JComponent.getDefaultLocale.

Throws:
HeadlessException - if GraphicsEnvironment.isHeadless() returns true.
See Also:
GraphicsEnvironment.isHeadless(), JComponent.getDefaultLocale()
Method Detail

createRootPane

protected final JXRootPane createRootPane()
Overridden to create a JXRootPane and to ensure that the root pane is always created on the Event Dispatch Thread. Some applet containers do not start applets on the EDT; this method, therefore, protects against that. Actual, root pane creation occurs in createRootPaneSafely().

Overrides:
createRootPane in class JApplet
Returns:
the root pane for this applet
See Also:
createRootPaneSafely()

createRootPaneSafely

protected JXRootPane createRootPaneSafely()
This method performs the actual creation of the root pane and is guaranteed to be performed on the Event Dispatch Thread.

Subclasses that need to configure the root pane or create a custom root pane should override this method.

Returns:
the root pane for this applet

getRootPane

public JXRootPane getRootPane()

Specified by:
getRootPane in interface RootPaneContainer
Overrides:
getRootPane in class JApplet

getStatusBar

public JXStatusBar getStatusBar()
Returns the value of the status bar property from the underlying JXRootPane.

Returns:
the JXStatusBar which is the current status bar
See Also:
setStatusBar(JXStatusBar), JXRootPane.getStatusBar()

setStatusBar

public void setStatusBar(JXStatusBar statusBar)
Sets the status bar property on the underlying JXRootPane.

Parameters:
statusBar - the JXStatusBar which is to be the status bar
See Also:
getStatusBar(), JXRootPane.setStatusBar(JXStatusBar)

getToolBar

public JToolBar getToolBar()
Returns the value of the tool bar property from the underlying JXRootPane.

Returns:
the JToolBar which is the current tool bar
See Also:
setToolBar(JToolBar), JXRootPane.getToolBar()

setToolBar

public void setToolBar(JToolBar toolBar)
Sets the tool bar property on the underlying JXRootPane.

Parameters:
toolBar - the JToolBar which is to be the tool bar
See Also:
getToolBar(), JXRootPane.setToolBar(JToolBar)

getDefaultButton

public JButton getDefaultButton()
Returns the value of the default button property from the underlying JRootPane.

Returns:
the JButton which is the default button
See Also:
setDefaultButton(JButton), JRootPane.getDefaultButton()

setDefaultButton

public void setDefaultButton(JButton button)
Sets the default button property on the underlying JRootPane.

Parameters:
button - the JButton which is to be the default button
See Also:
getDefaultButton(), JRootPane.setDefaultButton(JButton)

getCancelButton

public JButton getCancelButton()
Returns the value of the cancel button property from the underlying JXRootPane.

Returns:
the JButton which is the cancel button
See Also:
setCancelButton(JButton), JXRootPane.getCancelButton()

setCancelButton

public void setCancelButton(JButton button)
Sets the cancel button property on the underlying JXRootPane.

Parameters:
button - the JButton which is to be the cancel button
See Also:
getCancelButton(), JXRootPane.setCancelButton(JButton)


Copyright © 2012. All Rights Reserved.