Liking cljdoc? Tell your friends :D

jdk.awt.CardLayout

A CardLayout object is a layout manager for a container. It treats each component in the container as a card. Only one card is visible at a time, and the container acts as a stack of cards. The first component added to a CardLayout object is the visible component when the container is first displayed.

The ordering of cards is determined by the container's own internal ordering of its component objects. CardLayout defines a set of methods that allow an application to flip through these cards sequentially, or to show a specified card. The addLayoutComponent(java.awt.Component, java.lang.Object) method can be used to associate a string identifier with a given card for fast random access.

A CardLayout object is a layout manager for a
container. It treats each component in the container as a card.
Only one card is visible at a time, and the container acts as
a stack of cards. The first component added to a
CardLayout object is the visible component when the
container is first displayed.

The ordering of cards is determined by the container's own internal
ordering of its component objects. CardLayout
defines a set of methods that allow an application to flip
through these cards sequentially, or to show a specified card.
The addLayoutComponent(java.awt.Component, java.lang.Object)
method can be used to associate a string identifier with a given card
for fast random access.
raw docstring

->card-layoutclj

(->card-layout)
(->card-layout hgap vgap)

Constructor.

Creates a new card layout with the specified horizontal and vertical gaps. The horizontal gaps are placed at the left and right edges. The vertical gaps are placed at the top and bottom edges.

hgap - the horizontal gap. - int vgap - the vertical gap. - int

Constructor.

Creates a new card layout with the specified horizontal and
 vertical gaps. The horizontal gaps are placed at the left and
 right edges. The vertical gaps are placed at the top and bottom
 edges.

hgap - the horizontal gap. - `int`
vgap - the vertical gap. - `int`
raw docstring

add-layout-componentclj

(add-layout-component this comp constraints)

Adds the specified component to this card layout's internal table of names. The object specified by constraints must be a string. The card layout stores this string as a key-value pair that can be used for random access to a particular card. By calling the show method, an application can display the component with the specified name.

comp - the component to be added. - java.awt.Component constraints - a tag that identifies a particular card in the layout. - java.lang.Object

throws: java.lang.IllegalArgumentException - if the constraint is not a string.

Adds the specified component to this card layout's internal
 table of names. The object specified by constraints
 must be a string. The card layout stores this string as a key-value
 pair that can be used for random access to a particular card.
 By calling the show method, an application can
 display the component with the specified name.

comp - the component to be added. - `java.awt.Component`
constraints - a tag that identifies a particular card in the layout. - `java.lang.Object`

throws: java.lang.IllegalArgumentException - if the constraint is not a string.
raw docstring

firstclj

(first this parent)

Flips to the first card of the container.

parent - the parent container in which to do the layout - java.awt.Container

Flips to the first card of the container.

parent - the parent container in which to do the layout - `java.awt.Container`
raw docstring

get-hgapclj

(get-hgap this)

Gets the horizontal gap between components.

returns: the horizontal gap between components. - int

Gets the horizontal gap between components.

returns: the horizontal gap between components. - `int`
raw docstring

get-layout-alignment-xclj

(get-layout-alignment-x this parent)

Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

parent - java.awt.Container

returns: float

Returns the alignment along the x axis.  This specifies how
 the component would like to be aligned relative to other
 components.  The value should be a number between 0 and 1
 where 0 represents alignment along the origin, 1 is aligned
 the furthest away from the origin, 0.5 is centered, etc.

parent - `java.awt.Container`

returns: `float`
raw docstring

get-layout-alignment-yclj

(get-layout-alignment-y this parent)

Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

parent - java.awt.Container

returns: float

Returns the alignment along the y axis.  This specifies how
 the component would like to be aligned relative to other
 components.  The value should be a number between 0 and 1
 where 0 represents alignment along the origin, 1 is aligned
 the furthest away from the origin, 0.5 is centered, etc.

parent - `java.awt.Container`

returns: `float`
raw docstring

get-vgapclj

(get-vgap this)

Gets the vertical gap between components.

returns: the vertical gap between components. - int

Gets the vertical gap between components.

returns: the vertical gap between components. - `int`
raw docstring

invalidate-layoutclj

(invalidate-layout this target)

Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

target - java.awt.Container

Invalidates the layout, indicating that if the layout manager
 has cached information it should be discarded.

target - `java.awt.Container`
raw docstring

lastclj

(last this parent)

Flips to the last card of the container.

parent - the parent container in which to do the layout - java.awt.Container

Flips to the last card of the container.

parent - the parent container in which to do the layout - `java.awt.Container`
raw docstring

layout-containerclj

(layout-container this parent)

Lays out the specified container using this card layout.

Each component in the parent container is reshaped to be the size of the container, minus space for surrounding insets, horizontal gaps, and vertical gaps.

parent - the parent container in which to do the layout - java.awt.Container

Lays out the specified container using this card layout.

 Each component in the parent container is reshaped
 to be the size of the container, minus space for surrounding
 insets, horizontal gaps, and vertical gaps.

parent - the parent container in which to do the layout - `java.awt.Container`
raw docstring

maximum-layout-sizeclj

(maximum-layout-size this target)

Returns the maximum dimensions for this layout given the components in the specified target container.

target - the component which needs to be laid out - java.awt.Container

returns: java.awt.Dimension

Returns the maximum dimensions for this layout given the components
 in the specified target container.

target - the component which needs to be laid out - `java.awt.Container`

returns: `java.awt.Dimension`
raw docstring

minimum-layout-sizeclj

(minimum-layout-size this parent)

Calculates the minimum size for the specified panel.

parent - the parent container in which to do the layout - java.awt.Container

returns: the minimum dimensions required to lay out the subcomponents of the specified container - java.awt.Dimension

Calculates the minimum size for the specified panel.

parent - the parent container in which to do the layout - `java.awt.Container`

returns: the minimum dimensions required to lay out the
                subcomponents of the specified container - `java.awt.Dimension`
raw docstring

nextclj

(next this parent)

Flips to the next card of the specified container. If the currently visible card is the last one, this method flips to the first card in the layout.

parent - the parent container in which to do the layout - java.awt.Container

Flips to the next card of the specified container. If the
 currently visible card is the last one, this method flips to the
 first card in the layout.

parent - the parent container in which to do the layout - `java.awt.Container`
raw docstring

preferred-layout-sizeclj

(preferred-layout-size this parent)

Determines the preferred size of the container argument using this card layout.

parent - the parent container in which to do the layout - java.awt.Container

returns: the preferred dimensions to lay out the subcomponents of the specified container - java.awt.Dimension

Determines the preferred size of the container argument using
 this card layout.

parent - the parent container in which to do the layout - `java.awt.Container`

returns: the preferred dimensions to lay out the subcomponents
                of the specified container - `java.awt.Dimension`
raw docstring

previousclj

(previous this parent)

Flips to the previous card of the specified container. If the currently visible card is the first one, this method flips to the last card in the layout.

parent - the parent container in which to do the layout - java.awt.Container

Flips to the previous card of the specified container. If the
 currently visible card is the first one, this method flips to the
 last card in the layout.

parent - the parent container in which to do the layout - `java.awt.Container`
raw docstring

remove-layout-componentclj

(remove-layout-component this comp)

Removes the specified component from the layout. If the card was visible on top, the next card underneath it is shown.

comp - the component to be removed. - java.awt.Component

Removes the specified component from the layout.
 If the card was visible on top, the next card underneath it is shown.

comp - the component to be removed. - `java.awt.Component`
raw docstring

set-hgapclj

(set-hgap this hgap)

Sets the horizontal gap between components.

hgap - the horizontal gap between components. - int

Sets the horizontal gap between components.

hgap - the horizontal gap between components. - `int`
raw docstring

set-vgapclj

(set-vgap this vgap)

Sets the vertical gap between components.

vgap - the vertical gap between components. - int

Sets the vertical gap between components.

vgap - the vertical gap between components. - `int`
raw docstring

showclj

(show this parent name)

Flips to the component that was added to this layout with the specified name, using addLayoutComponent. If no such component exists, then nothing happens.

parent - the parent container in which to do the layout - java.awt.Container name - the component name - java.lang.String

Flips to the component that was added to this layout with the
 specified name, using addLayoutComponent.
 If no such component exists, then nothing happens.

parent - the parent container in which to do the layout - `java.awt.Container`
name - the component name - `java.lang.String`
raw docstring

to-stringclj

(to-string this)

Returns a string representation of the state of this card layout.

returns: a string representation of this card layout. - java.lang.String

Returns a string representation of the state of this card layout.

returns: a string representation of this card layout. - `java.lang.String`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close