|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.iver.cit.gvsig.gui.GUIUtil
Nested Class Summary | |
static class |
GUIUtil.Location
|
Field Summary | |
static javax.swing.filechooser.FileFilter |
ALL_FILES_FILTER
|
static java.lang.String |
dbf
|
static java.lang.String |
dbfDesc
|
static java.lang.String |
fme
|
static java.lang.String |
fmeDesc
|
static java.lang.String |
gml
|
static java.lang.String |
gmlDesc
|
static java.lang.String |
jml
|
static java.lang.String |
jmlDesc
|
static java.lang.String |
shp
|
static java.lang.String |
shpDesc
|
static java.lang.String |
shx
|
static java.lang.String |
shxDesc
|
static java.lang.String |
wkt
|
static java.lang.String |
wktaDesc
|
static java.lang.String |
wktDesc
|
static java.lang.String |
xml
|
static java.lang.String |
xmlDesc
|
Constructor Summary | |
GUIUtil()
|
Method Summary | |
static java.awt.geom.Point2D |
add(java.awt.geom.Point2D a,
java.awt.geom.Point2D b)
|
static void |
addInternalFrameListener(javax.swing.JDesktopPane pane,
javax.swing.event.InternalFrameListener listener)
Listens to all internal frames (current and future) in a JDesktopPane. |
static java.awt.Color |
alphaColor(java.awt.Color color,
int alpha)
|
static void |
centre(java.awt.Component componentToMove,
java.awt.Component componentToCentreOn)
Centres the first component on the second |
static void |
centreOnScreen(java.awt.Component componentToMove)
Centres the component on the screen |
static void |
centreOnWindow(java.awt.Component componentToMove)
Centres the component on its window |
static void |
chooseGoodColumnWidths(javax.swing.JTable table)
Sets the column widths based on the first row. |
static javax.swing.filechooser.FileFilter |
createFileFilter(java.lang.String description,
java.lang.String[] extensions)
|
static javax.swing.JFileChooser |
createJFileChooserWithExistenceChecking()
|
static javax.swing.JFileChooser |
createJFileChooserWithOverwritePrompting()
|
static javax.swing.Timer |
createRestartableSingleEventTimer(int delay,
java.awt.event.ActionListener listener)
Returns a Timer that fires once, after the delay. |
static ValidatingTextField |
createSyncdTextField(javax.swing.JSlider s)
|
static ValidatingTextField |
createSyncdTextField(javax.swing.JSlider s,
int columns)
|
static void |
dispose(javax.swing.JInternalFrame internalFrame,
javax.swing.JDesktopPane desktopPane)
Ensures that the next frame is activated when #dispose is called explicitly, in JDK 1.4. |
static void |
doNotRoundDoubles(javax.swing.JTable table)
|
static java.lang.String |
escapeHTML(java.lang.String value,
boolean escapeSpaces,
boolean escapeNewlines)
Returns a string suitable for embeddind as HTML. |
static void |
fixClicks(java.awt.Component c)
Fix for Sun Java Bug 4398733: if you click in an inactive JInternalFrame, the mousePressed and mouseReleased events will be fired, but not the mouseClicked event. |
static void |
fixEditableComboBox(javax.swing.JComboBox cb)
Workaround for Java Bug 4648654 "REGRESSION: Editable JComboBox focus misbehaves under Windows look and feel, proposed by Kleopatra (fastegal@addcom.de). |
static java.awt.datatransfer.Transferable |
getContents(java.awt.datatransfer.Clipboard clipboard)
The JVM's clipboard implementation is buggy (see bugs 4644554 and 4522198 in Sun's Java bug database). |
static java.awt.Component |
getDescendantOfClass(java.lang.Class c,
java.awt.Container container)
|
static java.lang.String |
getExtension(java.io.File f)
|
static void |
handleThrowable(java.lang.Throwable t,
java.awt.Component parent)
|
static void |
highlightForDebugging(javax.swing.JComponent component,
java.awt.Color color)
Highlights a given component with a given color. |
static void |
invokeOnEventThread(java.lang.Runnable r)
GUI operations should be performed only on the AWT event dispatching thread. |
static java.util.List |
items(javax.swing.JComboBox comboBox)
|
static java.awt.geom.Point2D |
multiply(java.awt.geom.Point2D v,
double x)
|
static java.lang.String |
nameWithoutExtension(java.io.File file)
|
static void |
removeChoosableFileFilters(javax.swing.JFileChooser fc)
|
static javax.swing.ImageIcon |
resize(javax.swing.ImageIcon icon,
int extent)
|
static java.io.File[] |
selectedFiles(javax.swing.JFileChooser chooser)
Work around Java Bug 4437688 "JFileChooser.getSelectedFile() returns nothing when a file is selected" [Jon Aquino] |
static void |
setLocation(java.awt.Component componentToMove,
GUIUtil.Location location,
java.awt.Component other)
|
static void |
setSelectedWithClick(javax.swing.JCheckBox checkBox,
boolean selected)
Calls #doClick so that events are fired. |
static java.awt.geom.Point2D |
subtract(java.awt.geom.Point2D a,
java.awt.geom.Point2D b)
|
static int |
swingThreadPriority()
|
static void |
sync(javax.swing.JCheckBox c1,
javax.swing.JCheckBox c2)
|
static void |
sync(javax.swing.JSlider s1,
javax.swing.JSlider s2)
|
static void |
sync(javax.swing.JSlider s,
ValidatingTextField t)
|
static void |
syncEnabledStates(javax.swing.JComponent c1,
javax.swing.JComponent c2)
|
static javax.swing.ImageIcon |
toDisabledIcon(javax.swing.ImageIcon icon)
|
static javax.swing.event.DocumentListener |
toDocumentListener(java.awt.event.ActionListener listener)
|
static javax.swing.event.InternalFrameListener |
toInternalFrameListener(java.awt.event.ActionListener listener)
|
static javax.swing.event.ListDataListener |
toListDataListener(java.awt.event.ActionListener listener)
|
static java.awt.Component |
topCard(java.awt.Container c)
|
static java.awt.Color |
toSimulatedTransparency(java.awt.Color color)
|
static javax.swing.ImageIcon |
toSmallIcon(javax.swing.ImageIcon icon)
Resizes icon to 16 x 16. |
static double |
trueAscent(java.awt.font.TextLayout layout)
Returns the distance from the baseline to the top of the text's bounding box. |
static java.lang.String |
truncateString(java.lang.String s,
int maxLength)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String dbf
public static final java.lang.String dbfDesc
public static final java.lang.String fme
public static final java.lang.String fmeDesc
public static final java.lang.String gml
public static final java.lang.String gmlDesc
public static final java.lang.String jml
public static final java.lang.String jmlDesc
public static final java.lang.String shp
public static final java.lang.String shpDesc
public static final java.lang.String shx
public static final java.lang.String shxDesc
public static final java.lang.String wkt
public static final java.lang.String wktDesc
public static final java.lang.String wktaDesc
public static final java.lang.String xml
public static final java.lang.String xmlDesc
public static final javax.swing.filechooser.FileFilter ALL_FILES_FILTER
Constructor Detail |
public GUIUtil()
Method Detail |
public static final java.lang.String escapeHTML(java.lang.String value, boolean escapeSpaces, boolean escapeNewlines)
Based on code from Jason Sherman. See http://www.w3schools.com/html/html_asciiref.asp
public static java.lang.String getExtension(java.io.File f)
public static java.awt.Color alphaColor(java.awt.Color color, int alpha)
public static void centre(java.awt.Component componentToMove, java.awt.Component componentToCentreOn)
componentToMove
- Description of the ParametercomponentToCentreOn
- Description of the Parameterpublic static void centreOnScreen(java.awt.Component componentToMove)
componentToMove
- Description of the Parameterpublic static void centreOnWindow(java.awt.Component componentToMove)
componentToMove
- Description of the Parameterpublic static void chooseGoodColumnWidths(javax.swing.JTable table)
table
- Description of the Parameterpublic static javax.swing.JFileChooser createJFileChooserWithExistenceChecking()
public static javax.swing.JFileChooser createJFileChooserWithOverwritePrompting()
public static void doNotRoundDoubles(javax.swing.JTable table)
public static void fixEditableComboBox(javax.swing.JComboBox cb)
cb
- Description of the Parameterpublic static void handleThrowable(java.lang.Throwable t, java.awt.Component parent)
public static void invokeOnEventThread(java.lang.Runnable r) throws java.lang.InterruptedException, java.lang.reflect.InvocationTargetException
java.lang.InterruptedException
java.lang.reflect.InvocationTargetException
public static java.lang.String nameWithoutExtension(java.io.File file)
public static void removeChoosableFileFilters(javax.swing.JFileChooser fc)
public static javax.swing.filechooser.FileFilter createFileFilter(java.lang.String description, java.lang.String[] extensions)
extensions
- e.g. txtpublic static java.awt.Color toSimulatedTransparency(java.awt.Color color)
color
- a Color with possibly an alpha less than 255
public static java.lang.String truncateString(java.lang.String s, int maxLength)
public static java.awt.geom.Point2D subtract(java.awt.geom.Point2D a, java.awt.geom.Point2D b)
public static java.awt.geom.Point2D add(java.awt.geom.Point2D a, java.awt.geom.Point2D b)
public static java.awt.geom.Point2D multiply(java.awt.geom.Point2D v, double x)
public static java.awt.datatransfer.Transferable getContents(java.awt.datatransfer.Clipboard clipboard)
public static double trueAscent(java.awt.font.TextLayout layout)
public static javax.swing.ImageIcon resize(javax.swing.ImageIcon icon, int extent)
public static javax.swing.ImageIcon toSmallIcon(javax.swing.ImageIcon icon)
public static int swingThreadPriority()
public static void fixClicks(java.awt.Component c)
public static void addInternalFrameListener(javax.swing.JDesktopPane pane, javax.swing.event.InternalFrameListener listener)
public static javax.swing.event.DocumentListener toDocumentListener(java.awt.event.ActionListener listener)
public static javax.swing.event.ListDataListener toListDataListener(java.awt.event.ActionListener listener)
public static javax.swing.event.InternalFrameListener toInternalFrameListener(java.awt.event.ActionListener listener)
public static javax.swing.Timer createRestartableSingleEventTimer(int delay, java.awt.event.ActionListener listener)
public static ValidatingTextField createSyncdTextField(javax.swing.JSlider s)
public static ValidatingTextField createSyncdTextField(javax.swing.JSlider s, int columns)
public static void sync(javax.swing.JSlider s, ValidatingTextField t)
createSyncdTextField(JSlider s, int columns)
public static void syncEnabledStates(javax.swing.JComponent c1, javax.swing.JComponent c2)
public static void sync(javax.swing.JSlider s1, javax.swing.JSlider s2)
public static void sync(javax.swing.JCheckBox c1, javax.swing.JCheckBox c2)
public static java.util.List items(javax.swing.JComboBox comboBox)
public static void setSelectedWithClick(javax.swing.JCheckBox checkBox, boolean selected)
public static void setLocation(java.awt.Component componentToMove, GUIUtil.Location location, java.awt.Component other)
public static void highlightForDebugging(javax.swing.JComponent component, java.awt.Color color)
public static java.awt.Component topCard(java.awt.Container c)
public static java.io.File[] selectedFiles(javax.swing.JFileChooser chooser)
public static javax.swing.ImageIcon toDisabledIcon(javax.swing.ImageIcon icon)
public static java.awt.Component getDescendantOfClass(java.lang.Class c, java.awt.Container container)
public static void dispose(javax.swing.JInternalFrame internalFrame, javax.swing.JDesktopPane desktopPane)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |