JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class PageArea

java.lang.Object
  |
  +--com.klg.jclass.page.PageArea
Direct Known Subclasses:
JCFrame, JCPage

public class PageArea
extends Object

PageArea is a class containing appearance- and layout-related methods common to Page and JCFrame.


Field Summary
protected  com.klg.jclass.page.render.Render background
          A render object representing the background paint of this object
protected  Color color
          The background colour of this object
protected  com.klg.jclass.page.JCDocument document
          The document to which this object belongs
protected  List frameList
          The list of frames included in this object
protected  int layoutStatus
          An indication of what types of macros remain unresolved in this object
protected  JCUnit.Point location
          The location of this object relative to its parent object
protected  String name
          The name of this object
protected  JCUnit.Dimension size
          The width and height of this object
 
Constructor Summary
PageArea()
          Create an empty page area
PageArea(com.klg.jclass.page.JCDocument doc)
          Create an empty page area belonging to a particular document
PageArea(String name)
          Create a named page area
PageArea(String name, com.klg.jclass.page.JCDocument doc)
          Create a named page area belonging to a particular document
PageArea(String name, com.klg.jclass.page.JCDocument doc, JCUnit.Point location, JCUnit.Dimension size)
          Create a named page area with the given position and size in a document
PageArea(String name, JCUnit.Point location, JCUnit.Dimension size)
          Create a named page area with the given position and size
 
Method Summary
protected  void calcLayoutStatus()
          Process the list of frames on the area to determine the current status
 void draw(Graphics2D gc)
          Draw the area and everything contained in it
protected  void drawEvalWatermark(Graphics2D gc)
          Draw a watermark that reads "EVAL" on the given graphics
protected  com.klg.jclass.page.render.Render getBackground()
          Get the background render object representing this object's background
 Color getColor()
          Get the color which is used to paint the background of the object
 com.klg.jclass.page.JCDocument getDocument()
          Return the document to which this object belongs
 List getFrameList()
          Get the list of frames which are included in (overlaid on) this object
 int getLayoutStatus()
          Get the flag which indicates if more passes are necessary to resolve any macros or print-time variables contained in the area
 JCUnit.Point getLocation()
          Get the origin (relative to the parent) of the object
 String getName()
          Get the name by which this object is known to other objects
 JCUnit.Dimension getSize()
          Get the width and height of the object
 void setColor(Color color)
          Set the color which is used to paint the background of the object
 void setDocument(com.klg.jclass.page.JCDocument doc)
          Set the document to which this object belongs
 void setFrameList(List frames)
          Set the list of frames which are included in (overlaid on) this object
 void setLayoutStatus(int new_status)
          Change the layout status flag to reflect manual changes to the completeness of any macros contained in the area
 void setLocation(JCUnit.Point new_location)
          Set the origin (relative to the parent) of the object
protected  void setName()
          Set the name by which this object is known to other objects
 void setSize(JCUnit.Dimension new_size)
          Set the width and height of the object
 com.klg.jclass.page.JCFrame stringToFrame(String name)
          Performs a lookup of the given name in the frame list
 void updateLayoutStatus(com.klg.jclass.page.JCFlow flow, com.klg.jclass.page.JCPage page)
          Attempt to resolve macros in this area given the flow and the current page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
The name of this object


document

protected com.klg.jclass.page.JCDocument document
The document to which this object belongs


location

protected JCUnit.Point location
The location of this object relative to its parent object


size

protected JCUnit.Dimension size
The width and height of this object


color

protected Color color
The background colour of this object


background

protected com.klg.jclass.page.render.Render background
A render object representing the background paint of this object


frameList

protected List frameList
The list of frames included in this object


layoutStatus

protected int layoutStatus
An indication of what types of macros remain unresolved in this object

Constructor Detail

PageArea

public PageArea()
Create an empty page area


PageArea

public PageArea(String name)
Create a named page area

Parameters:
name - The name to use for this page area

PageArea

public PageArea(com.klg.jclass.page.JCDocument doc)
Create an empty page area belonging to a particular document

Parameters:
doc - The document to which this page area will belong

PageArea

public PageArea(String name,
                com.klg.jclass.page.JCDocument doc)
Create a named page area belonging to a particular document

Parameters:
name - The name to use for this page area
doc - The document to which this page area will belong

PageArea

public PageArea(String name,
                JCUnit.Point location,
                JCUnit.Dimension size)
Create a named page area with the given position and size

Parameters:
name - The name to use for this page area
location - The origin of the page area with respect to its parent
size - The width and height of the page area

PageArea

public PageArea(String name,
                com.klg.jclass.page.JCDocument doc,
                JCUnit.Point location,
                JCUnit.Dimension size)
Create a named page area with the given position and size in a document

Parameters:
name - The name to use for this page area
doc - The document to which this page area will belong
location - The origin of the page area with respect to its parent
size - The width and height of the page area
Method Detail

getName

public String getName()
Get the name by which this object is known to other objects

Returns:
Internal name of the object

getDocument

public com.klg.jclass.page.JCDocument getDocument()
Return the document to which this object belongs

Returns:
this object's document

setDocument

public void setDocument(com.klg.jclass.page.JCDocument doc)
Set the document to which this object belongs

Parameters:
doc - The document to which this is being assigned

getLocation

public JCUnit.Point getLocation()
Get the origin (relative to the parent) of the object

Returns:
Position of the object's origin

setLocation

public void setLocation(JCUnit.Point new_location)
Set the origin (relative to the parent) of the object


getSize

public JCUnit.Dimension getSize()
Get the width and height of the object

Returns:
Dimensions of the object

setSize

public void setSize(JCUnit.Dimension new_size)
Set the width and height of the object


getColor

public Color getColor()
Get the color which is used to paint the background of the object

Returns:
Color assigned to the background

setColor

public void setColor(Color color)
Set the color which is used to paint the background of the object


getLayoutStatus

public int getLayoutStatus()
Get the flag which indicates if more passes are necessary to resolve any macros or print-time variables contained in the area

Returns:
Status of the most incomplete object in the area

setLayoutStatus

public void setLayoutStatus(int new_status)
Change the layout status flag to reflect manual changes to the completeness of any macros contained in the area

Parameters:
new_status - Status to reflect new level of page completeness

stringToFrame

public com.klg.jclass.page.JCFrame stringToFrame(String name)
Performs a lookup of the given name in the frame list

Returns:
Frame which matches the given name

setName

protected void setName()
Set the name by which this object is known to other objects


getBackground

protected com.klg.jclass.page.render.Render getBackground()
Get the background render object representing this object's background

Returns:
The render object that fills in the background color

setFrameList

public void setFrameList(List frames)
Set the list of frames which are included in (overlaid on) this object


getFrameList

public List getFrameList()
Get the list of frames which are included in (overlaid on) this object

Returns:
Set of frames this object contains

calcLayoutStatus

protected void calcLayoutStatus()
Process the list of frames on the area to determine the current status


updateLayoutStatus

public void updateLayoutStatus(com.klg.jclass.page.JCFlow flow,
                               com.klg.jclass.page.JCPage page)
Attempt to resolve macros in this area given the flow and the current page

Parameters:
flow - the document's current flow
page - the page on which the macros appear

draw

public void draw(Graphics2D gc)
Draw the area and everything contained in it


drawEvalWatermark

protected void drawEvalWatermark(Graphics2D gc)
Draw a watermark that reads "EVAL" on the given graphics


Copyright © 2004 Quest Software Inc..
All rights reserved.