Class Link

Link component. 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.

Synopsis

Since

3.0

Inheritance Path.  java.lang.Object-> com.itmill.toolkit.ui.AbstractComponent -> com.itmill.toolkit.ui.Link

Link()

Creates a new link.

Link(String, Resource)

Creates a new instance of Link

Link(String, Resource, String, int, int, int)

Parameters

caption

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

Width of the target window.

height

Height of the target window.

border

Borget style of the target window.

Creates a new instance of Link that opens a new window.

Link(Window)

Creates a new link to a window.

getResource()

Parameters

return

Resource

Returns the resource this link opens.

getTag()

Parameters

return

Component UIDL tag as string.

Get component UIDL tag.

getTargetBorder()

Parameters

return

int

Returns the target window border.

getTargetHeight()

Parameters

return

int

Returns the target window height or -1 if not set.

getTargetName()

Parameters

return

String

Returns the target window name. Empty name of null implies that the target is opened to the window containing the link.

getTargetWidth()

Parameters

return

int

Returns the target window width or -1 if not set.

getWindow()

Parameters

return

Window

Returns the window this link opens.

paintContent(PaintTarget)

Parameters

event

PaintEvent.

Exceptions

PaintException

The paint operation failed.

Paint the content of this component.

setResource(Resource)

Parameters

resource

The resource to set

Sets the resource this link opens.

setTargetBorder(int)

Parameters

targetBorder

The targetBorder to set

Sets the border of the target window.

setTargetHeight(int)

Parameters

targetHeight

The targetHeight to set

Sets the target window height.

setTargetName(String)

Parameters

targetName

The targetName to set

Sets the target window name.

setTargetWidth(int)

Parameters

targetWidth

The targetWidth to set

Sets the target window width.

setWindow(Window)

Parameters

window

The window to set

Sets the window this link opens.