JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.page
Class JCTab

java.lang.Object
  |
  +--com.klg.jclass.page.JCTab
All Implemented Interfaces:
Cloneable

public class JCTab
extends Object
implements Cloneable

JCTab objects define tab positions in flowed text.


Field Summary
protected  JCUnit.Measure position
          The tab position from the left margin of the frame.
static int TAB_ALIGNMENT_CENTER
           
static int TAB_ALIGNMENT_DECIMAL
           
static int TAB_ALIGNMENT_LEFT
           
static int TAB_ALIGNMENT_RIGHT
           
static int TAB_FILL_DOTS
           
static int TAB_FILL_NONE
           
static int TAB_FILL_UNDERLINE
           
protected  int tabAlignment
          Alignment direction of text to the tab position.
protected  int tabFill
          Fill pattern to the left of the tab (tab leader).
 
Constructor Summary
JCTab()
          Creates an unset (left-aligned, no fill, left margin) tab.
JCTab(JCUnit.Measure location)
          Creates a (left-aligned) tab at the given location.
JCTab(JCUnit.Measure location, int alignment)
          Creates a tab at the given location with the specified alignment.
 
Method Summary
 Object clone()
          Creates a new tab which is a copy of this one.
 int comparePosition(com.klg.jclass.page.JCTab new_tab)
          Compares two tab positions.
 boolean equals(Object o)
          Ensure that two JCTab objects with identical parameters returns true when tested for equality.
 JCUnit.Measure getPosition()
          Gets the position of the tab measured from the left margin.
 int getTabAlignment()
          Gets the alignment of text to the tab.
 int getTabFill()
          Gets the tab leader fill pattern.
 int hashCode()
          Ensure that two JCTab objects with identical parameters have the same hash code.
 void setPosition(JCUnit.Measure position)
          Specifies the position of the tab measured from the left margin.
 void setTabAlignment(int alignment)
          Specifies how text is aligned to the tab position (right, left, center, or decimal).
 void setTabFill(int fill_type)
          Sets the tab leader fill pattern (none, underline, dots).
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected JCUnit.Measure position
The tab position from the left margin of the frame.


tabAlignment

protected int tabAlignment
Alignment direction of text to the tab position.


tabFill

protected int tabFill
Fill pattern to the left of the tab (tab leader).


TAB_ALIGNMENT_LEFT

public static final int TAB_ALIGNMENT_LEFT
See Also:
Constant Field Values

TAB_ALIGNMENT_RIGHT

public static final int TAB_ALIGNMENT_RIGHT
See Also:
Constant Field Values

TAB_ALIGNMENT_CENTER

public static final int TAB_ALIGNMENT_CENTER
See Also:
Constant Field Values

TAB_ALIGNMENT_DECIMAL

public static final int TAB_ALIGNMENT_DECIMAL
See Also:
Constant Field Values

TAB_FILL_NONE

public static final int TAB_FILL_NONE
See Also:
Constant Field Values

TAB_FILL_UNDERLINE

public static final int TAB_FILL_UNDERLINE
See Also:
Constant Field Values

TAB_FILL_DOTS

public static final int TAB_FILL_DOTS
See Also:
Constant Field Values
Constructor Detail

JCTab

public JCTab()
Creates an unset (left-aligned, no fill, left margin) tab.


JCTab

public JCTab(JCUnit.Measure location)
Creates a (left-aligned) tab at the given location.

Parameters:
location - the position for the new tab

JCTab

public JCTab(JCUnit.Measure location,
             int alignment)
Creates a tab at the given location with the specified alignment.

Parameters:
location - the position for the new tab
alignment - the alignment of text to the tab
Method Detail

getPosition

public JCUnit.Measure getPosition()
Gets the position of the tab measured from the left margin.

Returns:
the horizontal position of the tab

setPosition

public void setPosition(JCUnit.Measure position)
Specifies the position of the tab measured from the left margin.

Parameters:
position - the horizontal position of the tab

getTabAlignment

public int getTabAlignment()
Gets the alignment of text to the tab.

Returns:
mode of alignment of text to this tab

setTabAlignment

public void setTabAlignment(int alignment)
Specifies how text is aligned to the tab position (right, left, center, or decimal).

Parameters:
alignment - method for aligning text to the tab position

getTabFill

public int getTabFill()
Gets the tab leader fill pattern.

Returns:
the pattern used to draw the leader line of a tab

setTabFill

public void setTabFill(int fill_type)
Sets the tab leader fill pattern (none, underline, dots).

Parameters:
fill_type - the pattern used to draw the leader line of a tab

comparePosition

public int comparePosition(com.klg.jclass.page.JCTab new_tab)
Compares two tab positions.

Parameters:
new_tab - a tab to compare to this tab
Returns:
negative, zero, or positive corresponding to less, equal, or greater

equals

public boolean equals(Object o)
Ensure that two JCTab objects with identical parameters returns true when tested for equality.

Overrides:
equals in class Object
Parameters:
o -
Returns:

hashCode

public int hashCode()
Ensure that two JCTab objects with identical parameters have the same hash code.

Overrides:
hashCode in class Object
Returns:

clone

public Object clone()
Creates a new tab which is a copy of this one.

Overrides:
clone in class Object
Returns:
an identical copy of this tab

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