| |
|
| tucana.echo2.app.WidgetDash
WidgetDash | public class WidgetDash extends Component (Code) | | A Widget Panel is a container organized in columns in which
WidgetContainer components can be placed. The Widgets
(WidgetContainers) can be repositioned in the panel such that they all line
up in columns. The state of the panel (the user's layout preference) can be
extracted and stored server-side, to be used later to recreate the panel for
a user.
author: Jeremy Volkman |
ACTION_LISTENERS_CHANGED_PROPERTY | final public static String ACTION_LISTENERS_CHANGED_PROPERTY(Code) | | |
ACTION_POSITIONS_UPDATED | final public static String ACTION_POSITIONS_UPDATED(Code) | | |
DEFAULT_COLUMN_COUNT | final public static int DEFAULT_COLUMN_COUNT(Code) | | |
DEFAULT_COLUMN_SPACING | final public static Extent DEFAULT_COLUMN_SPACING(Code) | | |
DEFAULT_DRAGGED_WIDGET_OPACITY | final public static float DEFAULT_DRAGGED_WIDGET_OPACITY(Code) | | |
DEFAULT_DRIFT_INTERVAL | final public static long DEFAULT_DRIFT_INTERVAL(Code) | | |
DEFAULT_DRIFT_STEP | final public static int DEFAULT_DRIFT_STEP(Code) | | |
DEFAULT_SHADOW_BORDER | final public static Border DEFAULT_SHADOW_BORDER(Code) | | |
DEFAULT_SHADOW_OPACITY | final public static float DEFAULT_SHADOW_OPACITY(Code) | | |
DEFAULT_SHADOW_TYPE | final public static int DEFAULT_SHADOW_TYPE(Code) | | |
DEFAULT_WIDGET_SPACING | final public static Extent DEFAULT_WIDGET_SPACING(Code) | | |
PROPERTY_COLUMN_COUNT | final public static String PROPERTY_COLUMN_COUNT(Code) | | Number of columns in panel.
|
PROPERTY_COLUMN_SPACING | final public static String PROPERTY_COLUMN_SPACING(Code) | | Horizontal spacing between columns.
|
PROPERTY_DRAGGED_WIDGET_OPACITY | final public static String PROPERTY_DRAGGED_WIDGET_OPACITY(Code) | | Opacity of dragged widget.
|
PROPERTY_DRAG_CONTAINER | final public static String PROPERTY_DRAG_CONTAINER(Code) | | Container to be used for widget dragging.
|
PROPERTY_DRAG_IN_BODY | final public static String PROPERTY_DRAG_IN_BODY(Code) | | Whether or not to drag widget in the HTML body element.
|
PROPERTY_DRIFT_INTERVAL | final public static String PROPERTY_DRIFT_INTERVAL(Code) | | The amount of time (ms) between drift animation steps.
|
PROPERTY_DRIFT_STEP | final public static String PROPERTY_DRIFT_STEP(Code) | | The distance in PX of each drift animation step.
|
PROPERTY_RETURN_METHOD | final public static String PROPERTY_RETURN_METHOD(Code) | | The type of dragged widget return to use (snap or drift (animated)).
|
PROPERTY_SHADOW_BORDER | final public static String PROPERTY_SHADOW_BORDER(Code) | | Widget shadow border (border mode).
|
PROPERTY_SHADOW_OPACITY | final public static String PROPERTY_SHADOW_OPACITY(Code) | | Opacity of widget shadow (clone mode).
|
PROPERTY_SHADOW_TYPE | final public static String PROPERTY_SHADOW_TYPE(Code) | | Type of widget shadow to use.
|
PROPERTY_WIDGET_SPACING | final public static String PROPERTY_WIDGET_SPACING(Code) | | Vertical spacing betwen widgets.
|
RETURN_METHOD_DRIFT | final public static int RETURN_METHOD_DRIFT(Code) | | Drift into position after dropping widget
|
RETURN_METHOD_SNAP | final public static int RETURN_METHOD_SNAP(Code) | | Snap into position after dropping widget
|
SHADOW_TYPE_BORDER | final public static int SHADOW_TYPE_BORDER(Code) | | A border widget shadow
|
SHADOW_TYPE_CLONE | final public static int SHADOW_TYPE_CLONE(Code) | | A cloned node widget shadow
|
WidgetDash | public WidgetDash()(Code) | | Default contstructor. Sets default values for all of the properties.
|
addActionListener | public void addActionListener(ActionListener l)(Code) | | Adds an ActionListener to receive notification of user
actions, i.e., widget position changes.
Parameters: l - the listener to add |
getColumnCount | public int getColumnCount()(Code) | | Return the number of columns in this WidgetPane
column count, or -1 if it is not set. |
getColumnSpacing | public Extent getColumnSpacing()(Code) | | Get the horizontal spacing between columns
The column spacing, or null if it is not set. |
getDragContainer | public Component getDragContainer()(Code) | | Get the current drag container being used.
The current drag container, or null if one is not set. |
getDraggedWidgetOpacity | public float getDraggedWidgetOpacity()(Code) | | Get the current dragged widget opacity value.
The current opacity value, or -1f if one is notset. |
getShadowBorder | public Border getShadowBorder()(Code) | | Get the current shadow border.
The current shadow border, or null if one is notset. See Also: WidgetDash.SHADOW_TYPE_BORDER |
getShadowOpacity | public float getShadowOpacity()(Code) | | Get the clone shadow opacity value
The current opacity value, or -1f if one is notset. See Also: WidgetDash.SHADOW_TYPE_CLONE |
getWidgetDashState | public WidgetDashState getWidgetDashState()(Code) | | Get the current state of this WidgetDash
A new WidgetDashState object. This object should not changeafter being returned from this method (i.e., it should notreference internal structures) |
getWidgetSpacing | public Extent getWidgetSpacing()(Code) | | Get the vertical spacing between widgets in a column
The vertical spacing, or null if it is not set. |
isDragInBody | public boolean isDragInBody()(Code) | | Return whether or not widgets are dragged in the HTML body element
Drag-in-body status |
isValidChild | public boolean isValidChild(Component child)(Code) | | Only allow WidgetContainer objects to be added to the WidgetPane
|
removeActionListener | public void removeActionListener(ActionListener l)(Code) | | Removes an ActionListener from being notified of user
actions, i.e., widget position changes.
Parameters: l - the listener to remove |
restore | public void restore(WidgetDashState state, WidgetContainerFactory factory)(Code) | | Populate the WidgetPane given the previously stored
WidgetDashState and a
WidgetContainerFactory . Widgets
listed in the WidgetPaneState will be added to this WidgetPane. Any widgets
in the dash before this call will be removed.
Parameters: state - The WidgetPaneState to construct from Parameters: factory - The WidgetFactory to use when building Widgets |
setColumnCount | public void setColumnCount(int newCount)(Code) | | Set the number of columns
Parameters: newCount - column count |
setColumnSpacing | public void setColumnSpacing(Extent spacing)(Code) | | Set the horizontal spacing between columns
Parameters: spacing - The column spacing |
setDragContainer | public void setDragContainer(Component dragContainer)(Code) | | Set the container (component) that widgets should be moved to when being
dragged. For example, if the WidgetDash is a child of a SplitPane,
dragging works best if the drag container is the parent SplitPane.
Parameters: dragContainer - The new drag container. |
setDragInBody | public void setDragInBody(boolean dragInBody)(Code) | | Sets whether or not widgets are dragged in the HTML body element
Parameters: dragInBody - New drag-in-body status See Also: WidgetDash.setDragContainer(Component) |
setDraggedWidgetOpacity | public void setDraggedWidgetOpacity(float opacity)(Code) | | Set the dragged widget opacity value. This value is applied to a widget
when it is clicked to be dragged. The widget's original opacity is reset
when it is dropped.
Parameters: opacity - The new opacity value. |
setShadowBorder | public void setShadowBorder(Border border)(Code) | | Set the shadow border to use.
Parameters: border - The new shadow border to use See Also: WidgetDash.SHADOW_TYPE_BORDER |
setShadowOpacity | public void setShadowOpacity(float opacity)(Code) | | Set the clone shadow opacity value
Parameters: opacity - The new opacity value See Also: WidgetDash.SHADOW_TYPE_CLONE |
setWidgetSpacing | public void setWidgetSpacing(Extent spacing)(Code) | | Set the vertical spacing between widgets in a column
Parameters: spacing - The vertical spacing |
|
|
|