|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.Identifiable
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.Link
public class Link
Link is used to create external or internal URL links. Internal links can be used to create action items, which change the state to application to one of the predefined states. For example, a link can be created for existing MenuTree items.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Field Summary | |
|---|---|
static int |
TARGET_BORDER_DEFAULT
|
static int |
TARGET_BORDER_MINIMAL
|
static int |
TARGET_BORDER_NONE
|
| Constructor Summary | |
|---|---|
Link()
Creates a new link. |
|
Link(String caption,
Resource resource)
Creates a new instance of Link. |
|
Link(String caption,
Resource resource,
String targetName,
int width,
int height,
int border)
Creates a new instance of Link that opens a new window. |
|
Link(Window window)
Creates a new link to a window. |
|
| Method Summary | |
|---|---|
Resource |
getResource()
Returns the resource this link opens. |
String |
getTag()
Gets the component UIDL tag. |
int |
getTargetBorder()
Returns the target window border. |
int |
getTargetHeight()
Returns the target window height or -1 if not set. |
String |
getTargetName()
Returns the target window name. |
int |
getTargetWidth()
Returns the target window width or -1 if not set. |
Window |
getWindow()
Returns the window this link opens. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
setResource(Resource resource)
Sets the resource this link opens. |
void |
setTargetBorder(int targetBorder)
Sets the border of the target window. |
void |
setTargetHeight(int targetHeight)
Sets the target window height. |
void |
setTargetName(String targetName)
Sets the target window name. |
void |
setTargetWidth(int targetWidth)
Sets the target window width. |
void |
setWindow(Window window)
Sets the window this link opens. |
| Methods inherited from class com.itmill.toolkit.terminal.Identifiable |
|---|
getDebugId, getUIID, setDebugId, setUIID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TARGET_BORDER_NONE
public static final int TARGET_BORDER_MINIMAL
public static final int TARGET_BORDER_DEFAULT
| Constructor Detail |
|---|
public Link()
public Link(Window window)
public Link(String caption,
Resource resource)
caption - resource -
public Link(String caption,
Resource resource,
String targetName,
int width,
int height,
int border)
caption - the Link text.targetName - the name of the target window where the link opens to. Empty
name of null implies that the target is opened to the window
containing the link.width - the Width of the target window.height - the Height of the target window.border - the Border style of the target window.| Method Detail |
|---|
public String getTag()
getTag in class AbstractComponent
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class AbstractComponenttarget - the Paint Event.
PaintException - if the paint operation failed.public int getTargetBorder()
public int getTargetHeight()
public String getTargetName()
public int getTargetWidth()
public void setTargetBorder(int targetBorder)
targetBorder - the targetBorder to set.public void setTargetHeight(int targetHeight)
targetHeight - the targetHeight to set.public void setTargetName(String targetName)
targetName - the targetName to set.public void setTargetWidth(int targetWidth)
targetWidth - the targetWidth to set.public Resource getResource()
public Window getWindow()
getWindow in interface ComponentgetWindow in class AbstractComponentpublic void setResource(Resource resource)
resource - the resource to set.public void setWindow(Window window)
window - the window to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||