|
||||||||||
| 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.
| Field Summary | |
|---|---|
static java.text.SimpleDateFormat |
DATE
Date Format. |
| Method Summary | |
|---|---|
static void |
addDefaultKeys(java.awt.Container c,
Dialog l)
Adds default notifiers for ENTER and ESCAPE to the specified component. |
static void |
addHelp(java.awt.Component comp,
byte[] hlp)
Adds a help notifier to the specified component. |
static void |
antiAlias(java.awt.Graphics g)
Enables/Disables anti-aliasing. |
static int |
calcHeight(java.awt.Graphics g,
MapRect r,
byte[] s)
Calculates the height of the specified text. |
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 focus)
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 int |
drawText(java.awt.Graphics g,
MapRect r,
byte[] s)
Draws a text. |
static int |
drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int m,
boolean draw)
Draws a text. |
static void |
drawThumbnails(java.awt.Graphics g,
MapRect r,
byte[] s)
Draws a text using thumbnail visualization. |
static void |
drawTooltip(java.awt.Graphics g,
java.lang.String tt,
int x,
int y,
int w,
int c)
Draws a visualization tooltip. |
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,
java.awt.Color c1,
java.awt.Color c2,
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 |
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 java.lang.String |
value(double val,
boolean size,
boolean date)
Returns the value of the specified pre value and attribute. |
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 |
| Field Detail |
|---|
public static final java.text.SimpleDateFormat DATE
| Method Detail |
|---|
public static BaseXBack okCancel(Dialog dialog)
dialog - reference to the component, reacting on button clicks.
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 void enableOK(javax.swing.JComponent panel,
boolean enabled)
panel - button panelenabled - enabled/disabled
public static void setWidth(java.awt.Container comp,
int w)
comp - componentw - width
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 addDefaultKeys(java.awt.Container c,
Dialog l)
c - the component that receives default notifications.l - the parent dialog
public static void addHelp(java.awt.Component comp,
byte[] hlp)
comp - componenthlp - help text
public static void enable(java.awt.Container comp,
boolean enable)
comp - componentenable - boolean flag
public static void select(javax.swing.AbstractButton but,
boolean select)
but - componentselect - selection flag
public static java.lang.String value(double val,
boolean size,
boolean date)
val - value to be evaluatedsize - size flagdate - date flag
public static void fill(java.awt.Graphics gg,
java.awt.Color c1,
java.awt.Color c2,
int xs,
int ys,
int xe,
int ye)
gg - graphics referencec1 - first colorc2 - second colorxs - horizontal start positionys - vertical start positionxe - horizontal end positionye - vertical end position
public static void drawCell(java.awt.Graphics g,
int xs,
int xe,
int ys,
int ye,
boolean focus)
g - graphics referencexs - horizontal start positionxe - horizontal end positionys - vertical start positionye - vertical end positionfocus - highlighting flagpublic static void antiAlias(java.awt.Graphics g)
g - graphics reference
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 drawTooltip(java.awt.Graphics g,
java.lang.String tt,
int x,
int y,
int w,
int c)
g - graphics referencett - tooltip labelx - horizontal positiony - vertical positionw - widthc - color color depth
public static int width(java.awt.Graphics g,
java.lang.String s)
g - graphics references - string to be evaluated
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 int centerPos(java.awt.Graphics g,
byte[] s,
int ww)
g - graphics references - string to be checkedww - maximum width
public static int calcHeight(java.awt.Graphics g,
MapRect r,
byte[] s)
g - graphics referencer - rectangles - text to be drawn
public static int drawText(java.awt.Graphics g,
MapRect r,
byte[] s)
g - graphics referencer - rectangles - text to be drawn
public static int drawText(java.awt.Graphics g,
MapRect r,
byte[] s,
int m,
boolean draw)
g - graphics referencer - rectangles - text to be drawnm - length of textdraw - draw text (otherwise: just calculate space)
public static void drawThumbnails(java.awt.Graphics g,
MapRect r,
byte[] s)
g - graphics referencer - rectangles - text to be drawn
public static int width(java.awt.Graphics g,
byte[] s)
g - graphics references - string to be evaluated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||