|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.base.ui.AbstractComponent | +--org.millstone.base.ui.AbstractComponentContainer | +--org.millstone.base.ui.Panel | +--org.millstone.base.ui.Window
Application window component.
Nested Class Summary |
Nested classes inherited from class org.millstone.base.ui.ComponentContainer |
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
Nested classes inherited from class org.millstone.base.ui.Component |
Component.Event, Component.Listener |
Nested classes inherited from class org.millstone.base.terminal.Paintable |
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary | |
static int |
BORDER_DEFAULT
Window with default borders |
static int |
BORDER_MINIMAL
Window with only minimal border |
static int |
BORDER_NONE
Window with no border |
Fields inherited from interface org.millstone.base.terminal.Sizeable |
UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
Window()
Create new empty unnamed window with default layout. |
|
Window(java.lang.String caption)
Create new empty window with default layout. |
|
Window(java.lang.String caption,
Layout layout)
Create new window. |
Method Summary | |
void |
addParameterHandler(ParameterHandler handler)
Add new parameter handler to this window. |
void |
addURIHandler(URIHandler handler)
Add new URI handler to this window |
Application |
getApplication()
Get application instance of the component. |
int |
getBorder()
Returns the border. |
java.lang.String |
getName()
Get the unique name of the window that indentifies it on the terminal. |
Component |
getParent()
Getter for property parent. |
java.lang.String |
getTag()
Get component UIDL tag. |
Terminal |
getTerminal()
Get terminal type. |
java.lang.String |
getTheme()
Get theme for this window. |
java.net.URL |
getURL()
Returns the full url of the window, this returns window specific url even for the main window. |
Window |
getWindow()
Get window of the component. |
void |
handleParameters(java.util.Map parameters)
Handle parameters. |
DownloadStream |
handleURI(java.net.URL context,
java.lang.String relativeUri)
Handle uri recursively. |
void |
open(Resource resource)
Open the given resource in this window. |
void |
open(Resource resource,
java.lang.String windowName)
Open the given resource in named terminal window. |
void |
open(Resource resource,
java.lang.String windowName,
int width,
int height,
int border)
Open the given resource in named terminal window with given size and border properties. |
void |
paintContent(PaintTarget target)
Paint the content of this component. |
void |
removeParameterHandler(ParameterHandler handler)
Remove given URI handler from this window. |
void |
removeURIHandler(URIHandler handler)
Remove given URI handler from this window |
void |
setApplication(Application application)
Sets the application this window is connected to. |
void |
setBorder(int border)
Sets the border. |
void |
setHeightUnits(int units)
Window only supports pixels as unit. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setParent(Component parent)
Setter for property parent. |
void |
setTerminal(Terminal type)
Set terminal type. |
void |
setTheme(java.lang.String theme)
Set theme for this window. |
void |
setWidthUnits(int units)
Window only supports pixels as unit. |
Methods inherited from class org.millstone.base.ui.Panel |
addComponent, changeVariables, componentAttachedToContainer, componentDetachedFromContainer, getComponentIterator, getHeight, getHeightUnits, getLayout, getScrollOffsetX, getScrollOffsetY, getWidth, getWidthUnits, isScrollable, removeComponent, replaceComponent, setHeight, setLayout, setScrollable, setScrollOffsetX, setScrollOffsetY, setWidth |
Methods inherited from class org.millstone.base.ui.AbstractComponentContainer |
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
Methods inherited from class org.millstone.base.ui.AbstractComponent |
addListener, addListener, addListener, addListener, childRequestedRepaint, dependsOn, fireComponentEvent, fireEvent, getCaption, getComponentError, getDescription, getDirectDependencies, getErrorMessage, getIcon, getLocale, getStyle, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setDescription, setEnabled, setIcon, setImmediate, setLocale, setReadOnly, setStyle, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.millstone.base.ui.Component |
addListener, childRequestedRepaint, getCaption, getIcon, getLocale, getStyle, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, setEnabled, setReadOnly, setStyle, setVisible |
Methods inherited from interface org.millstone.base.terminal.Paintable |
addListener, paint, removeListener, requestRepaint, requestRepaintRequests |
Methods inherited from interface org.millstone.base.terminal.VariableOwner |
dependsOn, getDirectDependencies, removeDirectDependency |
Field Detail |
public static final int BORDER_NONE
public static final int BORDER_MINIMAL
public static final int BORDER_DEFAULT
Constructor Detail |
public Window()
To show the window in application, it must be added to application with
Application.addWindow()
method.
The windows are scrollable by default.
public Window(java.lang.String caption)
To show the window in application, it must be added to application with
Application.addWindow()
method.
The windows are scrollable by default.
caption
- Title of the windowpublic Window(java.lang.String caption, Layout layout)
To show the window in application, it must be added to application with
Application.addWindow()
method.
The windows are scrollable by default.
caption
- Title of the windowlayout
- Layout of the windowMethod Detail |
public Terminal getTerminal()
public final Window getWindow()
getWindow
in interface Component
getWindow
in class AbstractComponent
public final Application getApplication()
getApplication
in interface Component
getApplication
in class AbstractComponent
public final Component getParent()
getParent
in interface Component
getParent
in class AbstractComponent
public void setParent(Component parent)
setParent
in interface Component
setParent
in class AbstractComponent
parent
- New value of property parent.public java.lang.String getTag()
getTag
in class Panel
public void addURIHandler(URIHandler handler)
public void removeURIHandler(URIHandler handler)
public DownloadStream handleURI(java.net.URL context, java.lang.String relativeUri)
handleURI
in interface URIHandler
public void addParameterHandler(ParameterHandler handler)
public void removeParameterHandler(ParameterHandler handler)
public void handleParameters(java.util.Map parameters)
ParameterHandler
Handle the given parameters. The parameters are given as inmodifieable
name to value map. All parameters names are of type: String
.
All the parameter values are arrays of strings.
handleParameters
in interface ParameterHandler
parameters
- Inmodifiable name to value[] mapping.public java.lang.String getTheme()
public void setTheme(java.lang.String theme)
theme
- New theme for this window. Null implies the default theme.public void paintContent(PaintTarget target) throws PaintException
paintContent
in class Panel
PaintException
- The paint operation failed.public void open(Resource resource)
public void open(Resource resource, java.lang.String windowName)
null
window name results the resource to be opened in this window.
public void open(Resource resource, java.lang.String windowName, int width, int height, int border)
null
window name results the resource to be opened in this window.
public java.net.URL getURL()
public java.lang.String getName()
public int getBorder()
public void setBorder(int border)
border
- The border to setpublic void setApplication(Application application)
This
method should not be invoked directly. Instead the
Application.addWindow(Window)
method should be used to add the window to an application and
Application.removeWindow(Window)
method for removing the window from the applicion. These
methods call this method implicitly.
The method invokes Component.attach()
and
Component.detach()
methods when necessary.
application
- The application to setpublic void setName(java.lang.String name)
The name of the window must be unique inside the application. Also the name may only contain the following characters: a-z, A-Z and 0-9.
If the name is null, the the window is given name automatically when it is added to an application.
name
- The name to setpublic void setTerminal(Terminal type)
type
- terminal type to setpublic void setHeightUnits(int units)
setHeightUnits
in interface Sizeable
setHeightUnits
in class Panel
Sizeable.getHeightUnits()
public void setWidthUnits(int units)
setWidthUnits
in interface Sizeable
setWidthUnits
in class Panel
Sizeable.getWidthUnits()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |