|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.editor.popup.PopupWindowManager
public class PopupWindowManager
The PopupWindowManager
helps to manage popup windows for a given editor pane. Specifically, it helps to position popups so that they are completely visible without obscuring other popups if possible. Note that the API for this package is still work in progress.
Field Summary | |
---|---|
static int |
EAST The constant indicating the west of a given rectangle location (when positining relative to location) or popup window (when positioning relative to popup). |
static int |
NORTH The constant indicating the west of a given rectangle location (when positining relative to location) or popup window (when positioning relative to popup). |
static int |
SOUTH The constant indicating the west of a given rectangle location (when positining relative to location) or popup window (when positioning relative to popup). |
static int |
WEST The constant indicating the west of a given rectangle location (when positining relative to location) or popup window (when positioning relative to popup). |
Method Summary | |
---|---|
void |
changePopupContent(PopupWindow popup, java.awt.Component content, boolean focusable) Changes the content within the PopupWindow . |
PopupWindow |
createPopup(java.awt.Component content, boolean focusable) Create a new PopupWindow with the given content. |
void |
deinstall(BasicEditorPane editor) Called when the plugin is being removed from the BasicEditorPane (for example when the editor is closed.) This is used to notify plugins that they should unregister any listeners that were attached. |
void |
dismissPopup(PopupWindow popup) Dismisses the popup window and any associated resources. |
void |
focusGained(java.awt.event.FocusEvent event) Invoked when a component gains the keyboard focus. |
void |
focusLost(java.awt.event.FocusEvent event) Invoked when a component loses the keyboard focus. |
protected BasicEditorPane |
getEditorPane() Fetch the editor pane this popup window manager is associated w/. |
static PopupWindowManager |
getPopupWindowManager(BasicEditorPane editor) Fetch the PopupWindowManager to use for the given editor pane. |
void |
install(BasicEditorPane editor) Called when this plugin is being installed into the BasicEditorPane. |
void |
positionPopup(PopupWindow popupWindow, java.awt.Rectangle relativeToLocation, int[] preferredLocations) Set the position of the PopupWindow relative to the location specified. |
void |
propertyChange(java.beans.PropertyChangeEvent event) This method gets called when a bound property is changed. |
void |
showPopup(PopupWindow popup, PopupWindowListener listener) Show the PopupWindow . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WEST
public static final int EAST
public static final int NORTH
public static final int SOUTH
Method Detail |
---|
public static PopupWindowManager getPopupWindowManager(BasicEditorPane editor)
PopupWindowManager
to use for the given editor pane.editor
- the editor paneprotected BasicEditorPane getEditorPane()
public void install(BasicEditorPane editor)
install
in interface EditorPlugin
editor
- the editor panepublic void deinstall(BasicEditorPane editor)
deinstall
in interface EditorPlugin
editor
- the editor panepublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- the property change eventpublic PopupWindow createPopup(java.awt.Component content, boolean focusable)
PopupWindow
with the given content. The focusable parameter indicates whether the popup should be allowed to have focus at any time. If not, then if the popup window is brought to the front (i.e., user clicked on it), focus will be automatically moved back to the associated editor. The size of the popup window is automatically based on the size of the content provided.content
- the content to display in the popupfocusable
- whether the content is allowed to have focus or notpublic void showPopup(PopupWindow popup, PopupWindowListener listener)
PopupWindow
. The listener provided will be notified if the popup is closed, or if focus was lost.popup
- the popup windowpublic void positionPopup(PopupWindow popupWindow, java.awt.Rectangle relativeToLocation, int[] preferredLocations)
PopupWindow
relative to the location specified. The rectangle location specified is assumed to use coordinates relative to the underlying editor pane. The locations specified should be an array, such as "new int[] { NORTH, SOUTH }".popupWindow
- the popup windowrelativeToLocation
- the location (editor-relative) to position the popup relative topreferredLocations
- the array of preferred locationspublic void changePopupContent(PopupWindow popup, java.awt.Component content, boolean focusable)
PopupWindow
. This will cause the popup to be resized (but not repositioned.) It is up to the caller to reposition the popup window as appropriate.popup
- the popup windowcontent
- the new content to displayfocusable
- whether the new content should be allowed to have focuspublic void dismissPopup(PopupWindow popup)
popup
- the popup windowpublic void focusGained(java.awt.event.FocusEvent event)
focusGained
in interface java.awt.event.FocusListener
event
- the focus eventpublic void focusLost(java.awt.event.FocusEvent event)
focusLost
in interface java.awt.event.FocusListener
event
- the focus event
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |