APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.tools.jconsole

public Class Utilities

extends Object
Class Inheritance
Imports
java.awt.*, javax.accessibility.*, javax.swing.*, javax.swing.border.*, javax.swing.tree.*, sun.tools.jconsole.inspector.*

Miscellaneous utility methods for JConsole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Color
ensureContrast(Color c1, Color c2)

Modifies color c1 to ensure it has acceptable contrast relative to color c2.

public static double
public static JScrollPane
newTableScrollPane(JComponent comp)

A slightly modified border for JScrollPane to be used with a JTable inside a JTabbedPane.

public static void
public static void
private static Color
private static void
setTabbedPaneTransparency(JComponent comp, boolean transparent)

private static void
setTransparency(JComponent comp, boolean transparent)

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

windowsLaFback to summary
private static final String windowsLaF

Constructor Detail

Utilitiesback to summary
public Utilities()

Method Detail

ensureContrastback to summary
public static Color ensureContrast(Color c1, Color c2)

Modifies color c1 to ensure it has acceptable contrast relative to color c2. http://www.w3.org/TR/AERT#color-contrast http://www.cs.rit.edu/~ncs/color/t_convert.html#RGB%20to%20YIQ%20&%20YIQ%20to%20RGB

getColorBrightnessback to summary
public static double getColorBrightness(Color c)
newTableScrollPaneback to summary
public static JScrollPane newTableScrollPane(JComponent comp)

A slightly modified border for JScrollPane to be used with a JTable inside a JTabbedPane. It has only top part and the rest is clipped to make the overall border less thick. The top border helps differentiating the containing table from its container.

setAccessibleDescriptionback to summary
public static void setAccessibleDescription(Accessible comp, String description)
setAccessibleNameback to summary
public static void setAccessibleName(Accessible comp, String name)
setColorBrightnessback to summary
private static Color setColorBrightness(Color c, double y)
setTabbedPaneTransparencyback to summary
private static void setTabbedPaneTransparency(JComponent comp, boolean transparent)
setTransparencyback to summary
private static void setTransparency(JComponent comp, boolean transparent)
updateTransparencyback to summary
public static void updateTransparency(JComponent comp)
sun.tools.jconsole back to summary

private Class Utilities.TableScrollPane

extends JScrollPane
Class Inheritance
Annotations
@SuppressWarnings:serial

Field Summary

Inherited from javax.swing.JScrollPane:
columnHeaderhorizontalScrollBarhorizontalScrollBarPolicylowerLeftlowerRightrowHeaderupperLeftupperRightverticalScrollBarverticalScrollBarPolicyviewport

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
paintBorder(Graphics g)

Overrides javax.swing.JComponent.paintBorder.

Paints the component's border.

Inherited from javax.swing.JScrollPane:
createHorizontalScrollBarcreateVerticalScrollBarcreateViewportgetAccessibleContextgetColumnHeadergetCornergetHorizontalScrollBargetHorizontalScrollBarPolicygetRowHeadergetUIgetUIClassIDgetVerticalScrollBargetVerticalScrollBarPolicygetViewportgetViewportBordergetViewportBorderBoundsisValidateRootisWheelScrollingEnabledparamStringsetColumnHeadersetColumnHeaderViewsetComponentOrientationsetCornersetHorizontalScrollBarsetHorizontalScrollBarPolicysetLayoutsetRowHeadersetRowHeaderViewsetUIsetVerticalScrollBarsetVerticalScrollBarPolicysetViewportsetViewportBordersetViewportViewsetWheelScrollingEnabledupdateUI

Constructor Detail

TableScrollPaneback to summary
public TableScrollPane(JComponent comp)

Method Detail

paintBorderback to summary
protected void paintBorder(Graphics g)

Overrides javax.swing.JComponent.paintBorder.

Doc from javax.swing.JComponent.paintBorder.

Paints the component's border.

If you override this in a subclass you should not make permanent changes to the passed in Graphics. For example, you should not alter the clip Rectangle or modify the transform. If you need to do these operations you may find it easier to create a new Graphics from the passed in Graphics and manipulate it.