net.xoetrope.optional.layout
Class GuideSupport

java.lang.Object
  extended by net.xoetrope.optional.layout.GuideSupport
All Implemented Interfaces:
BuilderSupport

public class GuideSupport
extends java.lang.Object
implements BuilderSupport

Support object holding the guide information on behalf of a page

Copyright (c) Xoetrope Ltd., 2002-2003

$Revision: 1.12 $

License: see License.txt


Field Summary
static int GUIDE_SELECTION_TOLERANCE
          the tolerance for guide selection.
 
Constructor Summary
GuideSupport(XProject project)
          Create a new GuideSupport
 
Method Summary
 void addGuide(Guide g)
          Add a guide
 java.util.Vector getGuideCoords(boolean vert)
          Get the guide coordinates
 void read(java.lang.String fileName)
          Read an included file
 void read(XmlElement layoutElement)
          Read the guides from an XML element loaded from the page XML.
 void setGuideCoords(java.util.Vector coords, boolean vert)
          Set the guide coordinates
 void setPageBounds(int x, int y, int w, int h)
          Set the dimensions of the page container whos grid is being rendered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GUIDE_SELECTION_TOLERANCE

public static final int GUIDE_SELECTION_TOLERANCE
the tolerance for guide selection. The distance within which one must click on a guide to manipulate it within the editor

See Also:
Constant Field Values
Constructor Detail

GuideSupport

public GuideSupport(XProject project)
Create a new GuideSupport

Parameters:
project - the owner project
Method Detail

setPageBounds

public void setPageBounds(int x,
                          int y,
                          int w,
                          int h)
Set the dimensions of the page container whos grid is being rendered

Parameters:
x - the x or left coordinate
y - the y or top coordinate
w - the width dimension
h - the height dimension

getGuideCoords

public java.util.Vector getGuideCoords(boolean vert)
Get the guide coordinates

Parameters:
vert - true for the vertical guides
Returns:
the complete set of guides

setGuideCoords

public void setGuideCoords(java.util.Vector coords,
                           boolean vert)
Set the guide coordinates

Parameters:
coords - the coordinates
vert - true for the vertical guides

addGuide

public void addGuide(Guide g)
Add a guide

Parameters:
g - the new Guide

read

public void read(java.lang.String fileName)
Read an included file

Specified by:
read in interface BuilderSupport
Parameters:
fileName - the file to read

read

public void read(XmlElement layoutElement)
Read the guides from an XML element loaded from the page XML.

Specified by:
read in interface BuilderSupport
Parameters:
layoutElement - the layout XML element containing the guide configuration