edu.umd.cs.piccolox.swing
Interface SwingLayoutNode.Anchor

All Known Implementing Classes:
SwingLayoutNode.Anchor.AbstractAnchor
Enclosing class:
SwingLayoutNode

public static interface SwingLayoutNode.Anchor

Determines where nodes are anchored in the area allocated by the Swing layout manager. Predefined anchor names are similar to GridBagConstraint anchors and have the same semantics.


Nested Class Summary
static class SwingLayoutNode.Anchor.AbstractAnchor
           
 
Field Summary
static SwingLayoutNode.Anchor CENTER
          Anchors the node's center as the point used when laying it out.
static SwingLayoutNode.Anchor EAST
          Anchors the node's middle right as the point used when laying it out.
static SwingLayoutNode.Anchor NORTH
          Anchors the node's top center as the point used when laying it out.
static SwingLayoutNode.Anchor NORTHEAST
          Anchors the node's top right as the point used when laying it out.
static SwingLayoutNode.Anchor NORTHWEST
          Anchors the node's top left as the point used when laying it out.
static SwingLayoutNode.Anchor SOUTH
          Anchors the node's center bottom as the point used when laying it out.
static SwingLayoutNode.Anchor SOUTHEAST
          Anchors the node's bottom right as the point used when laying it out.
static SwingLayoutNode.Anchor SOUTHWEST
          Anchors the node's bottom left as the point used when laying it out.
static SwingLayoutNode.Anchor WEST
          Anchors the node's middle left as the point used when laying it out.
 
Method Summary
 void positionNode(PNode node, double x, double y, double width, double height)
          Positions the node in the bounds defined.
 

Field Detail

CENTER

static final SwingLayoutNode.Anchor CENTER
Anchors the node's center as the point used when laying it out.


NORTH

static final SwingLayoutNode.Anchor NORTH
Anchors the node's top center as the point used when laying it out.


NORTHEAST

static final SwingLayoutNode.Anchor NORTHEAST
Anchors the node's top right as the point used when laying it out.


EAST

static final SwingLayoutNode.Anchor EAST
Anchors the node's middle right as the point used when laying it out.


SOUTHEAST

static final SwingLayoutNode.Anchor SOUTHEAST
Anchors the node's bottom right as the point used when laying it out.


SOUTH

static final SwingLayoutNode.Anchor SOUTH
Anchors the node's center bottom as the point used when laying it out.


SOUTHWEST

static final SwingLayoutNode.Anchor SOUTHWEST
Anchors the node's bottom left as the point used when laying it out.


WEST

static final SwingLayoutNode.Anchor WEST
Anchors the node's middle left as the point used when laying it out.


NORTHWEST

static final SwingLayoutNode.Anchor NORTHWEST
Anchors the node's top left as the point used when laying it out.

Method Detail

positionNode

void positionNode(PNode node,
                  double x,
                  double y,
                  double width,
                  double height)
Positions the node in the bounds defined.

Parameters:
node - node to be laid out
x - left of bounds
y - top of bounds
width - width of bounds
height - height of bounds


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.