Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
org.gamecontrolplus.gui.MAlign Enum Reference

Public Member Functions

int getID ()
 
String getTextID ()
 
String getDesc ()
 
boolean isHorzAlign ()
 
boolean isVertAlign ()
 
String toString ()
 

Static Public Member Functions

static MAlign getFromID (int id)
 
static MAlign getFromText (String text)
 

Public Attributes

 INVALID =( -1, "INVALID", "Invalid alignment" )
 
 LEFT =( 0, "LEFT", "Align left" )
 
 CENTER =( 1, "CENTER", "Align centre horizontally" )
 
 RIGHT =( 2, "RIGHT", "Align right" )
 
 JUSTIFY =( 3, "JUSTIFY", "Justify text" )
 
 TOP =( 16, "TOP", "Align top" )
 
 MIDDLE =( 17, "MIDDLE", "Align middle vertically" )
 
 BOTTOM =( 18, "BOTTOM", "Align bottom" )
 

Private Member Functions

 MAlign (int id, String text, String desc)
 

Private Attributes

int alignID
 
String alignText
 
String description
 

Detailed Description

This class provides an enumeration that is used to control the alignment of text and images.

Author
Peter Lager

Constructor & Destructor Documentation

org.gamecontrolplus.gui.MAlign.MAlign ( int  id,
String  text,
String  desc 
)
private

A private constructor to prevent alignments being create outside this class.

Parameters
id
text
desc

Member Function Documentation

String org.gamecontrolplus.gui.MAlign.getDesc ( )

Get the description of this alignment

Returns
e.g. "Align top"
static MAlign org.gamecontrolplus.gui.MAlign.getFromID ( int  id)
static

Get an alignment based on its ID number.

Parameters
idthe id number for this alignment.
Returns
the alignment or INVALID if not found
static MAlign org.gamecontrolplus.gui.MAlign.getFromText ( String  text)
static

Get an alignment based on its alignment text.

Parameters
textthe alignment text.
Returns
the alignment or INVALID if not found
int org.gamecontrolplus.gui.MAlign.getID ( )

Get the id number associated with this alignment

Returns
the ID associated with this alignment
String org.gamecontrolplus.gui.MAlign.getTextID ( )

Get the text ID associated with this alignment.

Returns
alignment text e.g. "RIGHT"
boolean org.gamecontrolplus.gui.MAlign.isHorzAlign ( )

Is this a horizontal alignment constant?

boolean org.gamecontrolplus.gui.MAlign.isVertAlign ( )

Is this a vertical alignment constant?

String org.gamecontrolplus.gui.MAlign.toString ( )

Get the alignment text.