use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigDouble method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (spinner == null) {
final UndoActionInterface parentObj = this;
int xPos = getXPos();
FieldPanel fieldPanel = createFieldPanel(xPos, getLabel());
if (configurationSet) {
spinner = new DecimalSpinner(minValue, maxValue, stepSize, noOfDecimalPlaces);
} else {
spinner = new DecimalSpinner();
}
spinner.setBounds(xPos + BasePanel.WIDGET_X_START, 0, BasePanel.WIDGET_STANDARD_WIDTH, BasePanel.WIDGET_HEIGHT);
fieldPanel.add(spinner);
if (!isValueOnly()) {
setAttributeSelectionPanel(fieldPanel.internalCreateAttrButton(Double.class, this, isRasterSymbol()));
}
spinner.registerObserver(new SpinnerNotifyInterface() {
@Override
public void notify(double oldValue, double newValue) {
Double oldValueObj = Double.valueOf(oldValue);
Double newValueObj = Double.valueOf(newValue);
UndoManager.getInstance().addUndoEvent(new UndoEvent(parentObj, getFieldId(), oldValueObj, newValueObj));
valueUpdated();
}
});
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigGeometryField method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (attributeComboBox == null) {
final UndoActionInterface parentObj = this;
int xPos = getXPos();
FieldPanel fieldPanel = createFieldPanel(xPos, getLabel());
attributeComboBox = new JComboBox<String>();
attributeComboBox.setBounds(xPos + BasePanel.WIDGET_X_START, 0, BasePanel.WIDGET_STANDARD_WIDTH, BasePanel.WIDGET_HEIGHT);
fieldPanel.add(attributeComboBox);
populateAttributeComboBox();
if (!isValueOnly()) {
setAttributeSelectionPanel(fieldPanel.internalCreateAttrButton(Geometry.class, this, true));
}
attributeComboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (isAttributeComboBoxPopulated()) {
String newValueObj = (String) attributeComboBox.getSelectedItem();
UndoManager.getInstance().addUndoEvent(new UndoEvent(parentObj, "DataSourceAttribute", oldValueObj, newValueObj));
valueUpdated();
}
}
});
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigFeatureTypeConstraint method createUI.
/**
* Creates the ui.
*/
@Override
public void createUI() {
if (extentTable == null) {
int xPos = getXPos();
int maxNoOfFilterRows = 6;
int maxNoOfExtentRows = 6;
int maxY = getRowY(maxNoOfFilterRows + maxNoOfExtentRows);
FieldPanel fieldPanel = createFieldPanel(xPos, maxY, getLabel());
createFilterTable(xPos, maxNoOfFilterRows, fieldPanel);
createExtentTable(xPos, maxNoOfFilterRows, maxNoOfExtentRows, fieldPanel);
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigSortBy method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (sortbyPanel == null) {
sortbyPanel = new SortByPanel(this, NO_OF_ROWS);
int xPos = getXPos();
FieldPanel fieldPanel = createFieldPanel(xPos, BasePanel.WIDGET_HEIGHT * NO_OF_ROWS, getLabel());
fieldPanel.add(sortbyPanel);
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigWindBarbs method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
FieldPanel fieldPanel = createFieldPanel(0, "");
fieldPanel.setLayout(new BorderLayout());
windBarbsPanel = new WindBarbDetails(this);
fieldPanel.add(windBarbsPanel, BorderLayout.CENTER);
Dimension panelSize = windBarbsPanel.getPanelSize();
fieldPanel.setPreferredSize(panelSize);
}
Aggregations