站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LayoutFactory (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.layout
Class LayoutFactory

java.lang.Object
  extended by org.netbeans.api.visual.layout.LayoutFactory

public final class LayoutFactory
extends Object

This class is a factory of all built-in layouts.


Nested Class Summary
static class LayoutFactory.ConnectionWidgetLayoutAlignment
          Alignment of children widgets within a calculated connection widgets used by default layout used in a connection widget.
static class LayoutFactory.SerialAlignment
          Alignment of children widgets within a calculated widget used by FlowLayout (vertical and horizontal flow layout).
 
Method Summary
static Layout createAbsoluteLayout()
          Creates an absolute layout where widgets are located at placed defined by their preferredLocation.
static Layout createCardLayout(Widget cardLayoutWidget)
          Creates a card layout where all children widgets except the active one are hidden.
static SceneLayout createDevolveWidgetLayout(Widget widget, Layout devolveLayout, boolean animate)
          Returns a scene layout which performs one-time layout using specified devolve-layout.
static Layout createFillLayout()
          Deprecated. use createOverlayLayout method instead
static Layout createHorizontalFlowLayout()
          Creates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another.
static Layout createHorizontalFlowLayout(LayoutFactory.SerialAlignment alignment, int gap)
          Creates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another.
static Layout createHorizontalLayout()
          Deprecated. use createHorizontalFlowLayout method instead
static Layout createHorizontalLayout(LayoutFactory.SerialAlignment alignment, int gap)
          Deprecated. use createHorizontalFlowLayout (alignment, gap) method instead
static Layout createOverlayLayout()
          Returns a overlay layout where all children widgets has the boundary at the biggest one of them or they are expanded to the parent widget boundaries during justification.
static
<N,E> SceneLayout
createSceneGraphLayout(GraphPinScene<N,E,?> graphPinScene, GraphLayout<N,E> graphLayout)
          Creates a scene layout which performs a specified graph-oriented layout on a specified GraphPinScene.
static
<N,E> SceneLayout
createSceneGraphLayout(GraphScene<N,E> graphScene, GraphLayout<N,E> graphLayout)
          Creates a scene layout which performs a specified graph-oriented layout on a specified GraphScene.
static Layout createVerticalFlowLayout()
          Creates a vertical flow layout with default style where widgets are placed vertically one to the bottom from another.
static Layout createVerticalFlowLayout(LayoutFactory.SerialAlignment alignment, int gap)
          Creates a vertical flow layout with a specific style where widgets are placed vertically one to the bottom from another.
static Layout createVerticalLayout()
          Deprecated. use createVerticalFlowLayout method instead
static Layout createVerticalLayout(LayoutFactory.SerialAlignment alignment, int gap)
          Deprecated. use createVerticalFlowLayout (alignment, gap) method instead
static Widget getActiveCard(Widget cardLayoutWidget)
          Returns active card of a specified widget where a card layout is used.
static void setActiveCard(Widget widget, Widget activeChildWidget)
          Sets active card of a specified widget where a card layout is used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createAbsoluteLayout

public static Layout createAbsoluteLayout()
Creates an absolute layout where widgets are located at placed defined by their preferredLocation. The instance can be shared by multiple widgets.

Returns:
the absolute layout

createVerticalLayout

public static Layout createVerticalLayout()
Deprecated. use createVerticalFlowLayout method instead

Creates a vertical flow layout with default style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets.

Returns:
the vertical flow layout

createVerticalLayout

public static Layout createVerticalLayout(LayoutFactory.SerialAlignment alignment,
                                          int gap)
Deprecated. use createVerticalFlowLayout (alignment, gap) method instead

Creates a vertical flow layout with a specific style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets.

Parameters:
alignment - the alignment
gap - the gap between widgets
Returns:
the vertical flow layout

createVerticalFlowLayout

public static Layout createVerticalFlowLayout()
Creates a vertical flow layout with default style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets.

Returns:
the vertical flow layout

createVerticalFlowLayout

public static Layout createVerticalFlowLayout(LayoutFactory.SerialAlignment alignment,
                                              int gap)
Creates a vertical flow layout with a specific style where widgets are placed vertically one to the bottom from another. The instance can be shared by multiple widgets.

Parameters:
alignment - the alignment
gap - the gap between widgets
Returns:
the vertical flow layout

createHorizontalLayout

public static Layout createHorizontalLayout()
Deprecated. use createHorizontalFlowLayout method instead

Creates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets.

Returns:
the horizontal flow layout

createHorizontalLayout

public static Layout createHorizontalLayout(LayoutFactory.SerialAlignment alignment,
                                            int gap)
Deprecated. use createHorizontalFlowLayout (alignment, gap) method instead

Creates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets.

Parameters:
alignment - the alignment
gap - the gap between widgets
Returns:
the horizontal flow layout

createHorizontalFlowLayout

public static Layout createHorizontalFlowLayout()
Creates a horizontal flow layout with default style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets.

Returns:
the horizontal flow layout

createHorizontalFlowLayout

public static Layout createHorizontalFlowLayout(LayoutFactory.SerialAlignment alignment,
                                                int gap)
Creates a horizontal flow layout with a specific style where widgets are placed horizontally one to the right from another. The instance can be shared by multiple widgets.

Parameters:
alignment - the alignment
gap - the gap between widgets
Returns:
the horizontal flow layout

createCardLayout

public static Layout createCardLayout(Widget cardLayoutWidget)
Creates a card layout where all children widgets except the active one are hidden. The active one is the only shown. The active widget could be managed using LayoutFactory.getActiveCard and LayoutFactory.setActiveCard methods. The instance cannot be shared.

Parameters:
cardLayoutWidget - the widget where the card layout is going to be used
Returns:
the card layout

getActiveCard

public static Widget getActiveCard(Widget cardLayoutWidget)
Returns active card of a specified widget where a card layout is used.

Parameters:
cardLayoutWidget - the widget with card layout
Returns:
the active widget

setActiveCard

public static void setActiveCard(Widget widget,
                                 Widget activeChildWidget)
Sets active card of a specified widget where a card layout is used.

Parameters:
widget - the widget with card layout
activeChildWidget - the new active widget

createFillLayout

public static Layout createFillLayout()
Deprecated. use createOverlayLayout method instead

Returns a fill layout where all children widgets has the boundary at the biggest one of them or they are expanded to the parent widget boundaries during justification. The instance can be shared by multiple widgets.

Returns:
the fill layout

createOverlayLayout

public static Layout createOverlayLayout()
Returns a overlay layout where all children widgets has the boundary at the biggest one of them or they are expanded to the parent widget boundaries during justification. The instance can be shared by multiple widgets.

Returns:
the overlay layout

createDevolveWidgetLayout

public static SceneLayout createDevolveWidgetLayout(Widget widget,
                                                    Layout devolveLayout,
                                                    boolean animate)
Returns a scene layout which performs one-time layout using specified devolve-layout. The instance cannot be shared.

Parameters:
widget - the
devolveLayout - the layout that is going to be used for one-time layout
animate - if true, then setting preferredLocation is gone animated
Returns:
the scene layout

createSceneGraphLayout

public static <N,E> SceneLayout createSceneGraphLayout(GraphScene<N,E> graphScene,
                                                       GraphLayout<N,E> graphLayout)
Creates a scene layout which performs a specified graph-oriented layout on a specified GraphScene.

Parameters:
graphScene - the graph scene
graphLayout - the graph layout
Returns:
the scene layout

createSceneGraphLayout

public static <N,E> SceneLayout createSceneGraphLayout(GraphPinScene<N,E,?> graphPinScene,
                                                       GraphLayout<N,E> graphLayout)
Creates a scene layout which performs a specified graph-oriented layout on a specified GraphPinScene.

Parameters:
graphPinScene - the graph pin scene
graphLayout - the graph layout
Returns:
the scene layout

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.