|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.basex.gui.layout.BaseXLayout
public final class BaseXLayout
This class assembles layout and paint methods which are frequently used in the GUI.
| Method Summary | |
|---|---|
static void |
addDefaultKeys(java.awt.Container c,
Dialog l)
Adds default notifiers for ENTER and ESCAPE to the specified component. |
static void |
antiAlias(java.awt.Graphics g)
Enables/Disables anti-aliasing. |
static int |
centerPos(java.awt.Graphics g,
byte[] s,
int ww)
Calculates if the string fits in one line; if yes, returns the horizontal start position. |
static int |
chopString(java.awt.Graphics g,
byte[] s,
int x,
int y,
int w)
Draws the specified string. |
static void |
drawCell(java.awt.Graphics g,
int xs,
int xe,
int ys,
int ye,
boolean high)
Draw the header of the scrollbar. |
static void |
drawCenter(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
Draws a centered string to the panel. |
static void |
drawRight(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
Draws a right aligned string to the panel. |
static int |
drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int wrap,
boolean draw)
Draws a text. |
static int |
drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int m,
int wrap,
boolean draw)
Draws a text. |
static void |
enable(java.awt.Container comp,
boolean enable)
Enables or disables the specified component. |
static void |
enableOK(javax.swing.JComponent panel,
boolean enabled)
Enables/disables the OK button in the specified panel. |
static void |
fill(java.awt.Graphics gg,
GUIConstants.FILL mode,
int xs,
int ys,
int xe,
int ye)
Fills the specified area with a color gradient. |
static BaseXBack |
newButtons(Dialog dialog,
boolean hor,
java.lang.String[] texts,
byte[][] help)
Creates a new button list. |
static BaseXBack |
okCancel(Dialog dialog)
Creates a OK and CANCEL button. |
static void |
rect(java.awt.Graphics g,
boolean active,
int xs,
int ys,
int xe,
int ye)
Draws a shadowed rectangle. |
static void |
select(javax.swing.AbstractButton but,
boolean select)
Selects or de-selects the specified component. |
static void |
setHeight(java.awt.Container comp,
int h)
Sets the component height, adopting the original component width. |
static void |
setSize(java.awt.Container comp,
int w,
int h)
Sets the component size. |
static void |
setWidth(java.awt.Container comp,
int w)
Sets the component width, adopting the original component height. |
static int |
width(java.awt.Graphics g,
byte[] s)
Returns the width of the specified text. |
static int |
width(java.awt.Graphics g,
java.lang.String s)
Returns the width of the specified text. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addDefaultKeys(java.awt.Container c,
Dialog l)
c - the component that receives default notifications.l - the parent dialogpublic static void antiAlias(java.awt.Graphics g)
g - graphics reference
public static int centerPos(java.awt.Graphics g,
byte[] s,
int ww)
g - graphics references - string to be checkedww - maximum width
public static int chopString(java.awt.Graphics g,
byte[] s,
int x,
int y,
int w)
g - graphics references - textx - x coordinatey - y coordinatew - width
public static void drawCell(java.awt.Graphics g,
int xs,
int xe,
int ys,
int ye,
boolean high)
g - graphics referencexs - horizontal start positionxe - horizontal end positionys - vertical start positionye - vertical end positionhigh - highlighting flag
public static void drawCenter(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
g - graphics referencetext - text to be paintedw - panel widthy - vertical position
public static void drawRight(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
g - graphics referencetext - text to be paintedw - panel widthy - vertical position
public static int drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int wrap,
boolean draw)
g - graphics referencer - rectangles - text to be drawnwrap - number of lines after which text is wrappeddraw - draw text (otherwise: just calculate space)
public static int drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int m,
int wrap,
boolean draw)
g - graphics referencer - rectangles - text to be drawnm - length of textwrap - number of lines after which text is wrappeddraw - draw text (otherwise: just calculate space)
public static void enable(java.awt.Container comp,
boolean enable)
comp - componentenable - boolean flag
public static void enableOK(javax.swing.JComponent panel,
boolean enabled)
panel - button panelenabled - enabled/disabled
public static void fill(java.awt.Graphics gg,
GUIConstants.FILL mode,
int xs,
int ys,
int xe,
int ye)
gg - graphics referencemode - mode for filling the componentxs - horizontal start positionys - vertical start positionxe - horizontal end positionye - vertical end position
public static BaseXBack newButtons(Dialog dialog,
boolean hor,
java.lang.String[] texts,
byte[][] help)
dialog - reference to the component, reacting on button clicks.hor - horizontal alignmenttexts - button nameshelp - help texts
public static BaseXBack okCancel(Dialog dialog)
dialog - reference to the component, reacting on button clicks.
public static void rect(java.awt.Graphics g,
boolean active,
int xs,
int ys,
int xe,
int ye)
g - graphics referenceactive - active flagxs - horizontal start positionys - vertical start positionxe - horizontal end positionye - vertical end position
public static void select(javax.swing.AbstractButton but,
boolean select)
but - componentselect - selection flag
public static void setHeight(java.awt.Container comp,
int h)
comp - componenth - height
public static void setSize(java.awt.Container comp,
int w,
int h)
comp - componentw - widthh - height
public static void setWidth(java.awt.Container comp,
int w)
comp - componentw - width
public static int width(java.awt.Graphics g,
byte[] s)
g - graphics references - string to be evaluated
public static int width(java.awt.Graphics g,
java.lang.String s)
g - graphics references - string to be evaluated
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||