Modelers

org.topcased.modeler.preferences
Class PageMargin

java.lang.Object
  extended by org.topcased.modeler.preferences.PageMargin

public class PageMargin
extends java.lang.Object

This class is used to store a PageMargin object. It provides facilities methods to handle it. Creation : 16 juin 2005


Field Summary
static PageMargin NO_MARGIN
          Basic No margin
static PageMargin SMALL_MARGIN
          Basic Small margin
 
Constructor Summary
PageMargin(java.lang.String value)
          The Constructor
PageMargin(java.lang.String name, int top, int left, int bottom, int right, boolean isModifiable)
          The constructor
 
Method Summary
 int getBottom()
          Get the bottom margin of the PageMargin
static PageMargin getDefault()
          Returns the default page margin from the preference store
 int getLeft()
          Get the left margin of the PageMargin
 boolean getModifiable()
          Return true if the PageMargin is modifiable
 java.lang.String getName()
          Get the name of the PageMargin
static PageMargin getPageMargin(java.lang.String name)
          Returns the page margin for the given name from the preference store
 int getRight()
          Get the right margin of the PageMargin
 int getTop()
          Get the top margin of the PageMargin
 void setBottom(int newValue)
          Set the bottom margin of the PageMargin
 void setLeft(int newValue)
          Set the left margin of the PageMargin
 void setModifiable(boolean newValue)
          Set the isModifiable parameter
 void setName(java.lang.String newName)
          Set the name of the PageMargin
 void setRight(int newValue)
          Set the right margin of the PageMargin
 void setTop(int newValue)
          Set the top margin of the PageMargin
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_MARGIN

public static final PageMargin NO_MARGIN
Basic No margin


SMALL_MARGIN

public static final PageMargin SMALL_MARGIN
Basic Small margin

Constructor Detail

PageMargin

public PageMargin(java.lang.String name,
                  int top,
                  int left,
                  int bottom,
                  int right,
                  boolean isModifiable)
The constructor

Parameters:
name - the name of this configuration
top - Top margin
left - Left margin
bottom - Bottom margin
right - Right margin
isModifiable - true if the configuration ca be changed

PageMargin

public PageMargin(java.lang.String value)
The Constructor

Parameters:
value - the String value of a PageMargin (ex:"No Margin;0;0;0;0;false")
Method Detail

getDefault

public static PageMargin getDefault()
Returns the default page margin from the preference store

Returns:
the default page margin

getPageMargin

public static PageMargin getPageMargin(java.lang.String name)
Returns the page margin for the given name from the preference store

Parameters:
name - the page margin name
Returns:
the page margin

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

setName

public void setName(java.lang.String newName)
Set the name of the PageMargin

Parameters:
newName - the new name

getName

public java.lang.String getName()
Get the name of the PageMargin

Returns:
the name

setTop

public void setTop(int newValue)
Set the top margin of the PageMargin

Parameters:
newValue - the new top margin

getTop

public int getTop()
Get the top margin of the PageMargin

Returns:
the top margin

setLeft

public void setLeft(int newValue)
Set the left margin of the PageMargin

Parameters:
newValue - the new left margin

getLeft

public int getLeft()
Get the left margin of the PageMargin

Returns:
the left margin

setBottom

public void setBottom(int newValue)
Set the bottom margin of the PageMargin

Parameters:
newValue - the new bottom margin

getBottom

public int getBottom()
Get the bottom margin of the PageMargin

Returns:
the bottom margin

setRight

public void setRight(int newValue)
Set the right margin of the PageMargin

Parameters:
newValue - the new right margin

getRight

public int getRight()
Get the right margin of the PageMargin

Returns:
the right margin

setModifiable

public void setModifiable(boolean newValue)
Set the isModifiable parameter

Parameters:
newValue - determine if the PageMargin can be modified by the user

getModifiable

public boolean getModifiable()
Return true if the PageMargin is modifiable

Returns:
true if the PageMargin is modifiable

Modelers

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.