use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigArrow method createUI.
/**
* Creates the ui.
*/
@Override
public void createUI() {
FieldPanel fieldPanel = createFieldPanel(0, "");
fieldPanel.setLayout(new BorderLayout());
arrowPanel = new ArrowDetails(this);
fieldPanel.add(arrowPanel, BorderLayout.CENTER);
Dimension panelSize = arrowPanel.getPanelSize();
fieldPanel.setPreferredSize(panelSize);
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigTTF method createUI.
/**
* Creates the ui.
*/
@Override
public void createUI() {
if (ttfPanel == null) {
FieldPanel fieldPanel = createFieldPanel(0, "");
fieldPanel.setLayout(new BorderLayout());
ttfPanel = new TTFDetails(this);
fieldPanel.add(ttfPanel, BorderLayout.CENTER);
Dimension panelSize = ttfPanel.getPanelSize();
fieldPanel.setPreferredSize(panelSize);
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigTransformation method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (textField == null) {
final UndoActionInterface parentObj = this;
int xPos = getXPos();
int width = BasePanel.FIELD_PANEL_WIDTH - xPos - 20;
int height = BasePanel.WIDGET_HEIGHT * (NO_OF_ROWS - 1);
textField = new JTextArea();
textField.setBounds(xPos, BasePanel.WIDGET_HEIGHT, width, height);
textField.setEditable(false);
JScrollPane scroll = new JScrollPane(textField);
scroll.setBounds(xPos, BasePanel.WIDGET_HEIGHT, width, height);
scroll.setAutoscrolls(true);
FieldPanel fieldPanel = createFieldPanel(xPos, BasePanel.WIDGET_HEIGHT * NO_OF_ROWS, getLabel());
fieldPanel.add(scroll);
//
// Edit button
//
final JButton buttonEdit = new JButton(editButtonText);
buttonEdit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ProcessFunction expression = showTransformationDialog(processFunction);
if (expression != null) {
ProcessFunction newValueObj = processFunction;
processFunction = expression;
textField.setText(ParameterFunctionUtils.getString(processFunction));
UndoManager.getInstance().addUndoEvent(new UndoEvent(parentObj, getFieldId(), oldValueObj, newValueObj));
valueUpdated();
}
}
});
buttonEdit.setBounds(xPos + BasePanel.WIDGET_X_START, 0, BasePanel.WIDGET_BUTTON_WIDTH, BasePanel.WIDGET_HEIGHT);
fieldPanel.add(buttonEdit);
//
// Clear button
//
final JButton buttonClear = new JButton(clearButtonText);
buttonClear.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
processFunction = null;
textField.setText("");
UndoManager.getInstance().addUndoEvent(new UndoEvent(parentObj, getFieldId(), oldValueObj, null));
valueUpdated();
}
});
buttonClear.setBounds((int) buttonEdit.getBounds().getMaxX() + 5, 0, BasePanel.WIDGET_BUTTON_WIDTH, BasePanel.WIDGET_HEIGHT);
fieldPanel.add(buttonClear);
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigColour method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (colourButton == null) {
final UndoActionInterface parentObj = this;
int xPos = getXPos();
FieldPanel fieldPanel = createFieldPanel(xPos, getLabel());
colourButton = new ColourButton();
colourButton.setBounds(xPos + BasePanel.WIDGET_X_START, 0, BasePanel.WIDGET_STANDARD_WIDTH, BasePanel.WIDGET_HEIGHT);
fieldPanel.add(colourButton);
if (!isValueOnly()) {
setAttributeSelectionPanel(fieldPanel.internalCreateAttrButton(String.class, this, isRasterSymbol()));
}
colourButton.registerObserver(new ColourNotifyInterface() {
@Override
public void notify(String colourString, double opacity) {
Color newValueObj = colourButton.getColour();
UndoManager.getInstance().addUndoEvent(new UndoEvent(parentObj, getFieldId(), oldValueObj, newValueObj));
oldValueObj = newValueObj;
valueUpdated();
}
});
}
}
use of com.sldeditor.ui.widgets.FieldPanel in project sldeditor by robward-scisys.
the class FieldConfigInlineFeature method createUI.
/**
* Creates the ui.
*/
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.detail.config.FieldConfigBase#createUI()
*/
@Override
public void createUI() {
if (inlineGML == null) {
inlineGML = new InlineGMLPreviewPanel(this, NO_OF_ROWS);
inlineFeature = new InlineFeaturePanel(this, NO_OF_ROWS);
tabbedPane = new JTabbedPane(JTabbedPane.TOP);
tabbedPane.addTab(Localisation.getString(FieldConfigBase.class, "FieldConfigInlineFeature.feature"), null, inlineFeature, Localisation.getString(FieldConfigBase.class, "FieldConfigInlineFeature.feature.tooltip"));
tabbedPane.addTab(Localisation.getString(FieldConfigBase.class, "FieldConfigInlineFeature.gml"), null, inlineGML, Localisation.getString(FieldConfigBase.class, "FieldConfigInlineFeature.gml.tooltip"));
tabbedPane.setBounds(0, 0, inlineGML.getWidth(), inlineGML.getHeight());
int xPos = getXPos();
FieldPanel fieldPanel = createFieldPanel(xPos, BasePanel.WIDGET_HEIGHT * NO_OF_ROWS, getLabel());
fieldPanel.add(tabbedPane);
}
}
Aggregations