|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.mtu.eggplant.util.gui.GraphicsUtils
public final class GraphicsUtils
graphics functions that should exist in java, but don't
Method Summary | |
---|---|
static Window |
basicGUIMain(Component c,
boolean dialog)
Defaults title to null. |
static Window |
basicGUIMain(Component c,
boolean dialog,
String title)
a basic main for testing a graphical class. |
static void |
centerWindow(Window window)
Centers the window on the screen. |
static void |
drawPolygons(Graphics g,
Collection<?> v)
draw a bunch of polygons |
static void |
drawPolygons(Graphics g,
Iterator<?> iter)
draw a bunch of polygons |
static void |
drawPolyLine(Graphics g,
Collection<?> points)
draw the points on the Graphics Context. |
static void |
error(String message)
Popup an error dialog with message in it. |
static void |
fillPolygons(Graphics g,
Collection<?> v)
fill a bunch of polygons |
static void |
fillPolygons(Graphics g,
Iterator<?> iter)
fill a bunch of polygons |
static ImageIcon |
getIcon(String path)
Create an icon from the resource at path. |
static int |
getMaxWidth(JComboBox combo,
FontMetrics fm)
|
static void |
notImplemented(String message)
Popup a warning dialog displaying message. |
static void |
setVisibleRowCount(JTable table,
int rows)
Set the preferred viewport size on a table based upon the number of rows that should be visible and the current heights of the rows. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Window basicGUIMain(Component c, boolean dialog)
basicGUIMain(Component, boolean, String)
public static Window basicGUIMain(Component c, boolean dialog, String title)
c
- the component to displaydialog
- if true
put in a JDialog, otherwise put in a
JFrametitle
- the title for the windowpublic static void centerWindow(Window window)
public static void drawPolyLine(Graphics g, Collection<?> points)
g
- the graphics contextpoints
- a collection of points, anything other than a point in this
vector is simply skippedpublic static void drawPolygons(Graphics g, Collection<?> v)
g
- the graphics contextv
- a Container of polygons, other classes are ignoredpublic static void drawPolygons(Graphics g, Iterator<?> iter)
g
- the graphics contextiter
- an Enumeration of polygons, other classes are ignoredpublic static void fillPolygons(Graphics g, Collection<?> v)
g
- the graphics contextv
- a Container of polygons, other classes are ignoredpublic static void fillPolygons(Graphics g, Iterator<?> iter)
g
- the graphics contextiter
- an Enumeration of polygons, other classes are ignoredpublic static int getMaxWidth(JComboBox combo, FontMetrics fm)
public static ImageIcon getIcon(String path)
public static void notImplemented(String message)
public static void error(String message)
public static void setVisibleRowCount(JTable table, int rows)
table
- the tablerows
- number of rows to have visible without scrolling
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |