Example usage for com.jgoodies.forms.layout ConstantSize.Unit equals

List of usage examples for com.jgoodies.forms.layout ConstantSize.Unit equals

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout ConstantSize.Unit equals.

Prototype

@Override
public boolean equals(Object o) 

Source Link

Document

Indicates whether some other ConstantSize is "equal to" this one.

Usage

From source file:com.intellij.uiDesigner.radComponents.FormLayoutColumnProperties.java

License:Apache License

private static void showConstantSize(final ConstantSize size, final JComboBox unitsCombo,
        final JSpinner spinner) {
    double value = size.getValue();
    ConstantSize.Unit unit = size.getUnit();
    if (unit.equals(ConstantSize.DIALOG_UNITS_X) || unit.equals(ConstantSize.DIALOG_UNITS_Y)) {
        unitsCombo.setSelectedItem("dlu");
    } else {/*from ww  w. j  ava2 s.  c o  m*/
        unitsCombo.setSelectedItem(unit.abbreviation());
    }

    spinner.setModel(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0));
    spinner.setValue(value);
}