|
||||||||||
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 |
addInteraction(Component comp,
byte[] hlp,
Window win)
Adds default interactions to the specified component. |
static int |
chopString(Graphics g,
byte[] s,
int x,
int y,
int w,
int fs)
Draws the specified string. |
static void |
drawCell(Graphics g,
int xs,
int xe,
int ys,
int ye,
boolean focus)
Draws a colored cell. |
static void |
drawCenter(Graphics g,
String text,
int w,
int y)
Draws a centered string to the panel. |
static void |
drawTooltip(Graphics g,
String tt,
int x,
int y,
int w,
int c)
Draws a visualization tooltip. |
static void |
fill(Graphics gg,
Color c1,
Color c2,
int xs,
int ys,
int xe,
int ye)
Fills the specified area with a color gradient. |
static void |
focus(Component cont,
byte[] help)
Sets the help text for the specified component. |
static ImageIcon |
icon(String name)
Returns the specified image as icon. |
static Image |
image(String name)
Returns the specified image. |
static URL |
imageURL(String name)
Returns the image url. |
static void |
setHeight(Component comp,
int h)
Sets the component height, adopting the original component width. |
static void |
setWidth(Component comp,
int w)
Sets the component width, adopting the original component height. |
static String |
value(double val,
boolean size,
boolean date)
Returns the value of the specified pre value and attribute. |
static int |
width(Graphics g,
byte[] s)
Returns the width of the specified text. |
static int |
width(Graphics g,
int[] cw,
int c)
Returns the character width of the specified character. |
static int |
width(Graphics g,
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 focus(Component cont, byte[] help)
cont
- input containerhelp
- help textpublic static void setWidth(Component comp, int w)
comp
- componentw
- widthpublic static void setHeight(Component comp, int h)
comp
- componenth
- heightpublic static void addInteraction(Component comp, byte[] hlp, Window win)
comp
- componenthlp
- help textwin
- parent windowpublic static ImageIcon icon(String name)
name
- name of icon
public static Image image(String name)
name
- name of image
public static URL imageURL(String name)
name
- name of image
public static String value(double val, boolean size, boolean date)
val
- value to be evaluatedsize
- size flagdate
- date flag
public static void fill(Graphics gg, Color c1, 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 positionpublic static void drawCell(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 drawCenter(Graphics g, String text, int w, int y)
g
- graphics referencetext
- text to be paintedw
- panel widthy
- vertical positionpublic static void drawTooltip(Graphics g, String tt, int x, int y, int w, int c)
g
- graphics referencett
- tooltip labelx
- horizontal positiony
- vertical positionw
- widthc
- color color depthpublic static int width(Graphics g, String s)
g
- graphics references
- string to be evaluated
public static int chopString(Graphics g, byte[] s, int x, int y, int w, int fs)
g
- graphics references
- textx
- x coordinatey
- y coordinatew
- widthfs
- font size
public static int width(Graphics g, byte[] s)
g
- graphics references
- string to be evaluated
public static int width(Graphics g, int[] cw, int c)
g
- graphics referencecw
- array with character widthsc
- character
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |