|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
oracle.javatools.ui.ghost.GhostPalette
public class GhostPalette
A semi-transparent container that floats above and the contents of a frame or window. Intended as a basis for a palette or other smaller non-modal window like container. By default the GhostPalette and its child components have a modified look and feel from the conponents elsewhere in the application. It manages it's size and location via mouse manipulation, much like a window. The panel obeys the maximum and minimum sizes and is bound fully within it's parent component. It has an optional close button which will hide the panel (see below) Much like JFrame since Java 1.5 the add, remove and setLayout calls are automatically routed to the content pane. Other calls such as removeAll() are not. The content pane is available via getContentPane() When the GhostPalette or its contents lose focus or the close button is pressed, the GhostPalette is hidden by calling setVisible(false) on itself. Clients can add a componentListener to listen for this state and perform any cleanup if this GhostPalette is not going to be shown again. Just before the GhostPalette is first displayed its contents are automatically converted to a 'ghost' look by the ComponentConverter. Components can opt out of this, and components added after will have to be manually ghosted see ComponentConverter.
Nested Class Summary | |
---|---|
protected class |
GhostPalette.ContentPanel |
Nested classes/interfaces inherited from class javax.swing.JLayeredPane |
---|
javax.swing.JLayeredPane.AccessibleJLayeredPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected javax.swing.JPanel |
container |
protected float |
fadeAmount |
protected UIConstants.Look |
look |
Fields inherited from class javax.swing.JLayeredPane |
---|
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
---|
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 | |
---|---|
GhostPalette() |
|
GhostPalette(javax.swing.JComponent owningComponent) |
|
GhostPalette(java.lang.String title) |
Method Summary | |
---|---|
void |
add(java.awt.Component comp, java.lang.Object constraints) |
protected void |
addImpl(java.awt.Component comp, java.lang.Object constraints, int index) Adds the specified child Component . |
void |
allowTemporaryHide() Gives the GhostPalette the ability to go temporarily almost-completely invisible via a key press (e.g. |
protected void |
dispose() Remove the panel from the layer and clean up the panel, it can not be shown again. |
void |
fadeInOut(boolean visible) Fade the panel in or out. |
javax.swing.JComponent |
getContentPanel() |
UIConstants.Look |
getLook() |
javax.swing.JComponent |
getOwningComponent() |
boolean |
getReceivesFocus() |
java.lang.String |
getTitle() |
void |
hidePanel() |
boolean |
isCloseVisible() |
boolean |
isHideOnLoseFocus() |
boolean |
isMovable() |
boolean |
isResizable() |
protected void |
makeVisible(boolean fadeIn) |
void |
pack() Causes this Panel to be sized to fit the preferred size and layouts of its subcomponents. |
void |
paint(java.awt.Graphics g) |
protected void |
positionPanel(javax.swing.JLayeredPane layeredPane, boolean positionInLayer) |
void |
registerTransparentComponent(javax.swing.JComponent comp) notify this GhostPanel of another component. |
void |
remove(java.awt.Component comp) Removes the specified component from the container. |
void |
removeNotify() |
protected void |
repaintVisible() |
void |
setBounds(int x, int y, int w, int h) |
void |
setCloseVisible(boolean visible) |
void |
setHideOnControlUp(boolean hide) |
void |
setHideOnLoseFocus(boolean newhideOnLoseFocus) |
void |
setLayout(java.awt.LayoutManager manager) Sets the LayoutManager . |
void |
setLook(UIConstants.Look look) Set the look used |
void |
setMovable(boolean isMovable) |
void |
setOwningComponent(javax.swing.JComponent owningComponent) The GhostPalette will be removed when the owning component is removed |
void |
setReceivesFocus(boolean receivesFocus) |
void |
setResizable(boolean isResizable) |
void |
setTitle(java.lang.String title) Set the title text. |
void |
show(javax.swing.JLayeredPane layeredPane, boolean positionInLayer, boolean fadeIn) Display this ghost panel in the given JLayeredPane. |
void |
unregisterTransparentComponent(javax.swing.JComponent comp) |
Methods inherited from class javax.swing.JLayeredPane |
---|
getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition |
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, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, addContainerListener, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected float fadeAmount
protected final javax.swing.JPanel container
protected UIConstants.Look look
Constructor Detail |
---|
public GhostPalette()
public GhostPalette(java.lang.String title)
public GhostPalette(javax.swing.JComponent owningComponent)
owningComponent
- ties this GhostPalette to another component. The GhostPalette will be removed from view when the owning component is removed.Method Detail |
---|
public void allowTemporaryHide()
public javax.swing.JComponent getOwningComponent()
public void setOwningComponent(javax.swing.JComponent owningComponent)
owningComponent
-public void setHideOnControlUp(boolean hide)
public void hidePanel()
public void registerTransparentComponent(javax.swing.JComponent comp)
comp
-public void unregisterTransparentComponent(javax.swing.JComponent comp)
public void setBounds(int x, int y, int w, int h)
setBounds
in class java.awt.Component
public void setCloseVisible(boolean visible)
public boolean isCloseVisible()
public void setLook(UIConstants.Look look)
public UIConstants.Look getLook()
public javax.swing.JComponent getContentPanel()
public void show(javax.swing.JLayeredPane layeredPane, boolean positionInLayer, boolean fadeIn)
layeredPane
- in which to add the ghost panel. This is usually a JFrame.getLayeredPane()positionInLayer
- true if this component is automatically positioned in the provided layeredPane.fadeIn
- true if the component will fade in, false will show it immediatelyprotected void positionPanel(javax.swing.JLayeredPane layeredPane, boolean positionInLayer)
protected void makeVisible(boolean fadeIn)
public void removeNotify()
removeNotify
in class javax.swing.JComponent
protected void dispose()
public void fadeInOut(boolean visible)
visible
-protected void repaintVisible()
protected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
Component
. This method is overridden to forward calls to the contentPane
.addImpl
in class javax.swing.JLayeredPane
comp
- the component to be enhancedconstraints
- the constraints to be respectedindex
- the indexjava.lang.IllegalArgumentException
RootPaneContainer
public void remove(java.awt.Component comp)
remove
in class java.awt.Container
comp
- the component to be removedjava.lang.NullPointerException
- if comp
is nullpublic void pack()
Component.isDisplayable()
public void setLayout(java.awt.LayoutManager manager)
LayoutManager
. Overridden to conditionally forward the call to the contentPane
.setLayout
in class java.awt.Container
manager
- the LayoutManager
RootPaneContainer
public void add(java.awt.Component comp, java.lang.Object constraints)
add
in class java.awt.Container
public void paint(java.awt.Graphics g)
paint
in class javax.swing.JLayeredPane
public void setTitle(java.lang.String title)
title
- the title text, or use null to signify no titlepublic java.lang.String getTitle()
public void setReceivesFocus(boolean receivesFocus)
public boolean getReceivesFocus()
public void setHideOnLoseFocus(boolean newhideOnLoseFocus)
public boolean isHideOnLoseFocus()
public void setMovable(boolean isMovable)
public boolean isMovable()
public void setResizable(boolean isResizable)
public boolean isResizable()
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |