S-PLUS Connect/Java v1.0

com.insightful.controls
Class SplusControlMetrics

java.lang.Object
  extended by com.insightful.controls.SplusControlMetrics

public class SplusControlMetrics
extends Object

Singleton which calculates the standard Dimension for a control based on the size of the font used in dialogs. This provides consistent sizing of dialog controls.


Field Summary
static int HEIGHT_SPACE
           
static int HGAP
           
static int WIDTH_SPACE
          Extra space added to groups in addition to space for control
 
Method Summary
static Dimension getFullDimension()
          Gets the full dimension of a control.
static Dimension getLabelDimension()
          Gets the standard label dimension.
static boolean isLongLabel(JLabel label)
          Function to determine whether a long label is needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH_SPACE

public static final int WIDTH_SPACE
Extra space added to groups in addition to space for control

See Also:
Constant Field Values

HEIGHT_SPACE

public static final int HEIGHT_SPACE
See Also:
Constant Field Values

HGAP

public static final int HGAP
See Also:
Constant Field Values
Method Detail

getLabelDimension

public static final Dimension getLabelDimension()
Gets the standard label dimension.

Returns:
dimension of a standard label or text field

getFullDimension

public static final Dimension getFullDimension()
Gets the full dimension of a control. This is twice the width of the label dimension, with additional marginal spacing added to the height and width.

Returns:
dimension of a single-line control, such as a text field with a label

isLongLabel

public static boolean isLongLabel(JLabel label)
Function to determine whether a long label is needed. This occurs if the label text is wider than the current labelDimension.width.

Returns:
boolean indicating whether the label is longer than will fit in the standard space for a label

S-PLUS Connect/Java v1.0

Copyright © 2000, 2002 Insightful Corporation
Warning: Classes not documented in the S-PLUS Programmer's Guide may change in future releases.