Modelers

org.topcased.modeler.preferences
Class PageFormat

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

public class PageFormat
extends java.lang.Object

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


Field Summary
static PageFormat A0
          Basic A0 format
static PageFormat A1
          Basic A1 format
static PageFormat A2
          Basic A2 format
static PageFormat A3
          Basic A3 format
static PageFormat A4
          Basic A4 format
static PageFormat A5
          Basic A5 format
 
Constructor Summary
PageFormat(java.lang.String value)
          The Constructor
PageFormat(java.lang.String name, int width, int height, boolean isModifiable)
          The constructor
 
Method Summary
static PageFormat getDefault()
          Returns the default page format from the preference store
 int getHeight()
          Get the height of the PageFormat
 boolean getModifiable()
          Return true if the PageFormat is modifiable
 java.lang.String getName()
          Get the name of the PageFormat
static PageFormat getPageFormat(java.lang.String name)
          Returns the page format for the given name from the preference store
 int getWidth()
          Get the width of the PageFormat
 void setHeight(int newValue)
          Set the height of the PageFormat
 void setModifiable(boolean newValue)
          Set the isModifiable parameter
 void setName(java.lang.String newName)
          Set the name of the PageFormat
 void setWidth(int newValue)
          Set the width of the PageFormat
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A5

public static final PageFormat A5
Basic A5 format


A4

public static final PageFormat A4
Basic A4 format


A3

public static final PageFormat A3
Basic A3 format


A2

public static final PageFormat A2
Basic A2 format


A1

public static final PageFormat A1
Basic A1 format


A0

public static final PageFormat A0
Basic A0 format

Constructor Detail

PageFormat

public PageFormat(java.lang.String name,
                  int width,
                  int height,
                  boolean isModifiable)
The constructor

Parameters:
name - the name of this configuration
width - The page width
height - The page height
isModifiable - true if the configuration ca be changed

PageFormat

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

Parameters:
value - the String value of a PageFormat (ex:"A4;210;297;false")
Method Detail

getDefault

public static PageFormat getDefault()
Returns the default page format from the preference store

Returns:
the default page format

getPageFormat

public static PageFormat getPageFormat(java.lang.String name)
Returns the page format for the given name from the preference store

Parameters:
name - the page format name
Returns:
the page format

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 PageFormat

Parameters:
newName - the new name

getName

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

Returns:
the name

setWidth

public void setWidth(int newValue)
Set the width of the PageFormat

Parameters:
newValue - the new width

getWidth

public int getWidth()
Get the width of the PageFormat

Returns:
the width

setHeight

public void setHeight(int newValue)
Set the height of the PageFormat

Parameters:
newValue - the new height

getHeight

public int getHeight()
Get the height of the PageFormat

Returns:
the height

setModifiable

public void setModifiable(boolean newValue)
Set the isModifiable parameter

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

getModifiable

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

Returns:
true if the page format is modifiable

Modelers

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