|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Window
This interface represents the contents of a single Window within the system. 'Windows' may be operating-system level windows, subwindows, or even areas in tabs depending on the user's chosen interface style.
Method Summary | |
---|---|
void |
activate()
Activates the window (brings it to front and sets keyboard focus). |
void |
attention()
Call when something important has happened in this window and the user should be visually notified (if it isn't on top). |
void |
close()
Closes the window. |
boolean |
getCanClearAttention()
|
java.lang.String |
getExtraRemember()
|
java.lang.String |
getTitle()
|
boolean |
isActive()
|
boolean |
isClosed()
|
boolean |
isHidden()
|
boolean |
isMinimized()
|
void |
minimize()
Minimises the window. |
void |
setCanClearAttention(boolean canClearAttention)
Sets whether the window can clear attention if the user activates it or otherwise makes it visible. |
void |
setClosable(boolean closeable)
Sets whether the user can close the window. |
void |
setContents(org.w3c.dom.Element e)
Clears existing contents and sets the contents of the window based on an XML document. |
void |
setContents(Widget w)
Clears existing contents and sets the contents of the window to a single widget. |
void |
setExtraRemember(java.lang.String text)
Store additional text that will be remembered with the window position. |
void |
setIcon(java.awt.Image icon)
Sets the window's icon; used in title bars and switchbar. |
void |
setInitialSize(int width,
int height)
Set the window's initial size. |
void |
setMinSize(int minWidth,
int minHeight)
Set the minimum size for this window. |
void |
setOnActive(java.lang.String callback)
Sets the action method called when window becomes active (current). |
void |
setOnClosed(java.lang.String callback)
Sets the action method called when window is closed. |
void |
setOnClosing(java.lang.String callback)
Sets the action method called when window is about to be closed. |
void |
setRemember(java.lang.String category,
java.lang.String id)
Set details used to remember the window position. |
void |
setResizable(boolean resizable)
Set whether the user can resize the window. |
void |
setTitle(java.lang.String title)
Sets the window's title; used in title bars and switchbar. |
void |
show(boolean minimised)
Call when the window is ready to show. |
Methods inherited from interface com.leafdigital.ui.api.WidgetOwner |
---|
getCallbackHandler, getGroupSelected, getWidget, isCreated, setWidgetID |
Method Detail |
---|
void setTitle(java.lang.String title)
title
- New title textjava.lang.String getTitle()
void setIcon(java.awt.Image icon)
icon
- Image to use for icon (can be any size, but should be
square; will be resized to necessary size; must be fully loaded,
for example a BufferedImage or obtained via lc.util.loadImage)void attention()
void setCanClearAttention(boolean canClearAttention)
canClearAttention
- True if attention will be cleared, false if it won'tboolean getCanClearAttention()
void setInitialSize(int width, int height)
Calling this after the window has been shown has no effect. If you choose a size lower than the minimum, the minimum will be used.
width
- Initial widthheight
- Initial heightvoid setResizable(boolean resizable)
resizable
- True if user can resize window.void setClosable(boolean closeable)
closeable
- True if user can close window.void setMinSize(int minWidth, int minHeight)
minWidth
- minHeight
- void setRemember(java.lang.String category, java.lang.String id)
category
- Category of window (must follow the rules for preferences
tokens, i.e. must start with a letter, all characters must be letters,
digits, - or _)id
- ID of window (should be unique within category; may be null
if there is never more than one window of that category; can include
any characters)void setExtraRemember(java.lang.String text)
text
- Extra textjava.lang.String getExtraRemember()
void show(boolean minimised)
minimised
- If true, initially shows in minimised statevoid setContents(Widget w)
w
- Desired widgetvoid setContents(org.w3c.dom.Element e)
e
- XML element; must follow the appropriate format
BugException
- If there are format problems with the XMLvoid close()
boolean isClosed()
void minimize()
void activate()
boolean isActive()
@UICallback void setOnClosed(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.@UICallback void setOnClosing(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.@UICallback void setOnActive(java.lang.String callback)
callback
- Name of method
BugException
- If method doesn't exist etc.boolean isHidden()
boolean isMinimized()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |