use of com.android.tools.idea.ui.properties.adapters.StringToDoubleAdapterProperty in project android by JetBrains.
the class ConfigureDeviceOptionsStep method onWizardStarting.
@Override
protected void onWizardStarting(@NotNull ModelWizard.Facade wizard) {
myDeviceTypeComboBox.setModel(new CollectionComboBoxModel<>(AvdWizardUtils.ALL_DEVICE_TAGS));
myDeviceTypeComboBox.setRenderer(new ListCellRendererWrapper<IdDisplay>() {
@Override
public void customize(JList list, IdDisplay value, int index, boolean selected, boolean hasFocus) {
if (value == null || SystemImage.DEFAULT_TAG.equals(value)) {
setText(DEFAULT_DEVICE_TYPE_LABEL);
} else {
setText(value.getDisplay());
}
}
});
myScrollPane.getVerticalScrollBar().setUnitIncrement(10);
myHelpAndErrorLabel.setBackground(JBColor.background());
myHelpAndErrorLabel.setForeground(JBColor.foreground());
myHelpAndErrorLabel.setBorder(BorderFactory.createEmptyBorder(15, 15, 10, 10));
myDiagScreenSizeAdapter = new StringToDoubleAdapterProperty(new TextProperty(myDiagonalScreenSize), 1, 2);
myScreenResWidthAdapter = new StringToIntAdapterProperty(new TextProperty(myScreenResolutionWidth));
myScreenResHeightAdapter = new StringToIntAdapterProperty(new TextProperty(myScreenResolutionHeight));
attachBindingsAndValidators();
}
Aggregations