public class TitledWindow<O extends OutputManager<?>> extends AbstractContainer<O>
Widget.ZOrderClass
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
title
Window title.
|
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
TitledWindow(java.lang.String title,
Insets insets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this widget.
|
protected void |
destroyWidgets()
Destroy all the widgtets in this window.
|
Widget<O> |
findMouseSource(MouseEvt evt)
Find the widget to which the given mouse event can be applied.
|
private double |
fixCol(double x)
Fix column to make widget fit into screen.
|
private double |
fixRow(double y)
Fix row to make widget fit into screen.
|
boolean |
focusTraversable()
Check if widget is focus traversable.
|
Dimension |
getWorkspaceSize()
Get the size of the window workspace area.
|
Widget.ZOrderClass |
getZOrderClass()
Get the Z-Order class
|
boolean |
hasFocus()
Check if widget has focus.
|
boolean |
hasTitle()
Check if window has non-empty title.
|
boolean |
hasTitlebar()
Check if window has title bar.
|
void |
hide()
Hide widget.
|
boolean |
isDisplayed()
Check if widget is displayed.
|
boolean |
isModal()
The method returns
true if this represents a modal window. |
void |
processEvent(Event event)
Process event and dispatch it to specific method.
|
void |
processKeyEvent(KeyInput event)
Process key event.
|
Point |
screenLocation()
Get absolute location of widget in screen coordinates.
|
void |
setTitle(java.lang.String title)
Set window title.
|
void |
show()
Show widget.
|
java.lang.String |
title()
Get window title.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
add, add, add, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, currentFocus, currentFocus, cycleFocus, defaultFocus, detach, dimension, doLayout, draw, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getWidgetsList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, prepareWidgets, prevFocus, remove, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setWidth, startSizeChange, unrealize, updateSizeWorker, widgets, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidthNative, getVisiblePart, hidden, highlighted, ignoreAction, isDirectManipulationCapable, isDirectManipulationRequired, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolveTitleFont, screen, screenDimension, screenHeight, screenPhysicalLocation, screenWidth, setBitmap, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, supportsCustomMousePointer, sync, topLevelWindow, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, hidden, highlighted, isDirectManipulable, isEnabled, isFocusable, isHeader, isRealized, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, location, moveToBottom, moveToTop, name, navigable, parent, parent, parentOrSelf, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, requestSync, resizeTo, screen, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, supportsCustomMousePointer, topLevelWindow, window
public TitledWindow(java.lang.String title, Insets insets)
title
- Window title.insets
- Window insets.public boolean isDisplayed()
isDisplayed
in interface Widget<O extends OutputManager<?>>
isDisplayed
in class AbstractWidget<O extends OutputManager<?>>
true
if widget is displayed.public boolean focusTraversable()
focusTraversable
in interface Widget<O extends OutputManager<?>>
focusTraversable
in class AbstractContainer<O extends OutputManager<?>>
true
if widget is focus traversable.public boolean hasFocus()
hasFocus
in interface Widget<O extends OutputManager<?>>
hasFocus
in class AbstractWidget<O extends OutputManager<?>>
true
if widget has focus.public void hide()
hide
in interface Widget<O extends OutputManager<?>>
hide
in class AbstractWidget<O extends OutputManager<?>>
public void processEvent(Event event)
processEvent
in interface Widget<O extends OutputManager<?>>
processEvent
in class AbstractWidget<O extends OutputManager<?>>
event
- Event to process.public Widget<O> findMouseSource(MouseEvt evt)
evt
- The mouse event.null
if none found.
By default, this method returns null
.public void processKeyEvent(KeyInput event)
processKeyEvent
in interface Widget<O extends OutputManager<?>>
processKeyEvent
in class AbstractContainer<O extends OutputManager<?>>
event
- Key event to process.public Point screenLocation()
screenLocation
in interface Widget<O extends OutputManager<?>>
screenLocation
in class AbstractWidget<O extends OutputManager<?>>
public void setTitle(java.lang.String title)
title
- Title to set.public void show()
show
in interface Widget<O extends OutputManager<?>>
show
in class AbstractWidget<O extends OutputManager<?>>
public java.lang.String title()
public boolean hasTitle()
true
if window has title.public boolean hasTitlebar()
true
if window has title to repaint.public Dimension getWorkspaceSize()
public boolean isModal()
true
if this represents a modal window.
That is a window that sits on top of other windows and takes exclusive user
input.
This implementation always returns false
.
private double fixCol(double x)
x
- Source column.private double fixRow(double y)
y
- Source row.public void destroy()
destroy
in interface Widget<O extends OutputManager<?>>
destroy
in class AbstractContainer<O extends OutputManager<?>>
public Widget.ZOrderClass getZOrderClass()
getZOrderClass
in interface Widget<O extends OutputManager<?>>
getZOrderClass
in class AbstractWidget<O extends OutputManager<?>>
public java.lang.String toString()
toString
in class AbstractWidget<O extends OutputManager<?>>
protected void destroyWidgets()