public final class BaseXLayout
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
BaseXLayout.DropHandler
Drag and drop handler.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addDrop(javax.swing.JComponent comp,
BaseXLayout.DropHandler dnd)
Adds drag and drop functionality.
|
static void |
chopString(java.awt.Graphics g,
byte[] s,
int x,
int y,
int w,
int fs)
Draws the specified string.
|
static java.util.ArrayList<java.lang.Object> |
contents(java.awt.datatransfer.Transferable tr)
Returns the contents of the specified transferable.
|
static void |
drawCell(java.awt.Graphics g,
int xs,
int xe,
int ys,
int ye,
boolean focus)
Draws a colored cell.
|
static void |
drawCenter(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
Draws a centered string to the panel.
|
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 |
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 javax.swing.ImageIcon |
icon(java.lang.String name)
Returns the specified image as icon.
|
static java.awt.Image |
image(java.lang.String name)
Returns the specified image.
|
static void |
setHeight(java.awt.Component comp,
int h)
Sets the component height, adopting the original component width.
|
static void |
setWidth(java.awt.Component comp,
int w)
Sets the component width, adopting the original component height.
|
static java.lang.String |
value(double val)
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,
int[] cw,
int c)
Returns the character width of the specified character.
|
static int |
width(java.awt.Graphics g,
java.lang.String s)
Returns the width of the specified text.
|
public static void setWidth(java.awt.Component comp,
int w)
comp - componentw - widthpublic static void setHeight(java.awt.Component comp,
int h)
comp - componenth - heightpublic static void addDrop(javax.swing.JComponent comp,
BaseXLayout.DropHandler dnd)
comp - componentdnd - drag and drop handlerpublic static java.util.ArrayList<java.lang.Object> contents(java.awt.datatransfer.Transferable tr)
tr - transferablepublic static javax.swing.ImageIcon icon(java.lang.String name)
name - name of iconpublic static java.awt.Image image(java.lang.String name)
name - name of imagepublic static java.lang.String value(double val)
val - value to be evaluatedpublic 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 positionpublic 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 drawCenter(java.awt.Graphics g,
java.lang.String text,
int w,
int y)
g - graphics referencetext - text to be paintedw - panel widthy - vertical positionpublic 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 depthpublic static int width(java.awt.Graphics g,
java.lang.String s)
g - graphics references - string to be evaluatedpublic static void chopString(java.awt.Graphics g,
byte[] s,
int x,
int y,
int w,
int fs)
g - graphics references - textx - x coordinatey - y coordinatew - widthfs - font sizepublic static int width(java.awt.Graphics g,
byte[] s)
g - graphics references - string to be evaluatedpublic static int width(java.awt.Graphics g,
int[] cw,
int c)
g - graphics referencecw - array with character widthsc - character