use of org.apache.airavata.xbaya.ui.widgets.XBayaTextField in project airavata by apache.
the class RegistryWorkflowPublisherWindow method initGUI.
/**
* Intialize UI
*/
private void initGUI() {
this.nameTextField = new XBayaTextField();
XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
this.descriptionTextArea = new XBayaTextArea();
XBayaLabel descriptionLabel = new XBayaLabel("Description", this.descriptionTextArea);
JPanel buttonPanel = new JPanel();
this.okButton = new JButton("OK");
this.okButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
ok();
}
});
buttonPanel.add(this.okButton);
GridPanel mainPanel = new GridPanel();
TitledBorder border = new TitledBorder(new EtchedBorder(), "Save Workflow to Registry");
mainPanel.getSwingComponent().setBorder(border);
mainPanel.add(nameLabel);
mainPanel.add(this.nameTextField);
mainPanel.add(descriptionLabel);
mainPanel.add(this.descriptionTextArea);
chkMakePublic = new JCheckBox("Make public");
mainPanel.add(chkMakePublic);
mainPanel.layout(2, 2, 0, 0);
this.dialog = new XBayaDialog(this.engine.getGUI(), "Save Workflow to Registry", mainPanel, buttonPanel);
this.dialog.setDefaultButton(this.okButton);
}
use of org.apache.airavata.xbaya.ui.widgets.XBayaTextField in project airavata by apache.
the class InputConfigurationDialog method initGui.
/**
* Initializes the GUI.
*/
private void initGui() {
this.nameTextField = new XBayaTextField();
XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
this.descriptionTextArea = new XBayaTextArea();
XBayaLabel descriptionLabel = new XBayaLabel("Description", this.descriptionTextArea);
// for string
this.valueTextField = new XBayaTextField();
this.valueLabel = new XBayaLabel("Value", this.valueTextField);
this.dataTypeTextField = new XBayaTextField();
this.dataTypeTextField.setEditable(false);
this.dataTypeLabel = new XBayaLabel("Type", this.dataTypeTextField);
this.gridPanel = new GridPanel();
this.gridPanel.add(nameLabel);
this.gridPanel.add(this.nameTextField);
this.gridPanel.add(this.valueLabel);
this.gridPanel.add(this.valueTextField);
this.gridPanel.add(this.dataTypeLabel);
this.gridPanel.add(this.dataTypeTextField);
this.gridPanel.add(descriptionLabel);
this.gridPanel.add(this.descriptionTextArea);
this.gridPanel.layout(4, 2, 3, 1);
JButton okButton = new JButton("OK");
okButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
setInput();
}
});
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
hide();
}
});
JPanel buttonPanel = new JPanel();
buttonPanel.add(okButton);
buttonPanel.add(cancelButton);
this.dialog = new XBayaDialog(this.xbayaGUI, "Input Parameter Configuration", this.gridPanel, buttonPanel);
this.dialog.setDefaultButton(okButton);
}
use of org.apache.airavata.xbaya.ui.widgets.XBayaTextField in project airavata by apache.
the class ReceiveConfigurationDialog method initGui.
/**
* Initializes the GUI.
*/
private void initGui() {
this.nameTextField = new XBayaTextField();
this.nameTextField.setEditable(false);
XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
this.idTextField = new XBayaTextField();
this.idTextField.setEditable(false);
XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);
SpinnerNumberModel model = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1);
this.numPorts = new JSpinner(model);
XBayaLabel numPortLabel = new XBayaLabel("Number of Parameters", this.numPorts);
GridPanel gridPanel = new GridPanel();
gridPanel.add(nameLabel);
gridPanel.add(this.nameTextField);
gridPanel.add(idLabel);
gridPanel.add(this.idTextField);
gridPanel.add(numPortLabel);
gridPanel.add(this.numPorts);
gridPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);
JButton okButton = new JButton("OK");
okButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
setInput();
}
});
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
hide();
}
});
JPanel buttonPanel = new JPanel();
buttonPanel.add(okButton);
buttonPanel.add(cancelButton);
this.dialog = new XBayaDialog(this.xbayaGUI, "Receive Configuration", gridPanel, buttonPanel);
this.dialog.setDefaultButton(okButton);
}
use of org.apache.airavata.xbaya.ui.widgets.XBayaTextField in project airavata by apache.
the class MonitorConfigurationWindow method initGui.
private void initGui() {
this.brokerTextField = new XBayaTextField();
XBayaLabel brokerLabel = new XBayaLabel("Broker URL", this.brokerTextField);
this.topicTextField = new XBayaTextField();
XBayaLabel topicLabel = new XBayaLabel("Topic", this.topicTextField);
this.pullCheckBox = new JCheckBox("Pull Mode");
JLabel dummyLabel = new JLabel();
this.messageBoxTextField = new XBayaTextField();
XBayaLabel msgBoxLabel = new XBayaLabel("Message Box URL", this.messageBoxTextField);
this.messageBoxTextField.setEnabled(false);
this.pullCheckBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent event) {
int stateChange = event.getStateChange();
if (stateChange == ItemEvent.SELECTED) {
MonitorConfigurationWindow.this.messageBoxTextField.setEnabled(true);
} else if (stateChange == ItemEvent.DESELECTED) {
MonitorConfigurationWindow.this.messageBoxTextField.setEnabled(false);
}
}
});
GridPanel infoPanel = new GridPanel();
infoPanel.add(brokerLabel);
infoPanel.add(this.brokerTextField);
infoPanel.add(topicLabel);
infoPanel.add(this.topicTextField);
infoPanel.add(dummyLabel);
infoPanel.add(this.pullCheckBox);
infoPanel.add(msgBoxLabel);
infoPanel.add(this.messageBoxTextField);
infoPanel.layout(4, 2, SwingUtil.WEIGHT_NONE, 1);
JButton okButton = new JButton("OK");
okButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
setConfiguration();
}
});
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
hide();
}
});
JPanel buttonPanel = new JPanel();
buttonPanel.add(okButton);
buttonPanel.add(cancelButton);
this.dialog = new XBayaDialog(this.engine.getGUI(), "Notification Configuration", infoPanel, buttonPanel);
this.dialog.setDefaultButton(okButton);
}
use of org.apache.airavata.xbaya.ui.widgets.XBayaTextField in project airavata by apache.
the class MonitorWindow method init.
private void init() {
this.timeTextField = new XBayaTextField();
this.timeTextField.setEditable(false);
XBayaLabel timeLabel = new XBayaLabel(EventDataRepository.Column.TIME.getName(), this.timeTextField);
this.idTextField = new XBayaTextField();
this.idTextField.setEditable(false);
XBayaLabel idLabel = new XBayaLabel(EventDataRepository.Column.ID.getName(), this.idTextField);
this.statusTextField = new XBayaTextField();
this.statusTextField.setEditable(false);
XBayaLabel statusLabel = new XBayaLabel(EventDataRepository.Column.STATUS.getName(), this.statusTextField);
this.messageTextArea = new JEditorPane(XmlConstants.CONTENT_TYPE_HTML, "");
this.messageTextArea.setSize(500, 500);
this.messageTextArea.setEditable(false);
messageTextArea.setBackground(Color.WHITE);
messageTextArea.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent event) {
if (event.getEventType() == EventType.ACTIVATED) {
URL url = event.getURL();
try {
BrowserLauncher.openURL(url.toString());
} catch (Exception e) {
MonitorWindow.this.xbayaGUI.getErrorWindow().error(MonitorWindow.this.dialog.getDialog(), e.getMessage(), e);
}
}
}
});
JScrollPane pane = new JScrollPane(messageTextArea);
pane.setSize(500, 500);
XBayaLabel messageLabel = new XBayaLabel(EventDataRepository.Column.MESSAGE.getName(), pane);
GridPanel infoPanel = new GridPanel();
infoPanel.add(timeLabel);
infoPanel.add(this.timeTextField);
infoPanel.add(idLabel);
infoPanel.add(this.idTextField);
infoPanel.add(statusLabel);
infoPanel.add(this.statusTextField);
infoPanel.add(messageLabel);
infoPanel.add(pane);
infoPanel.layout(4, 2, 3, 1);
JButton okButton = new JButton("OK");
okButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
hide();
}
});
JButton copyButton = new JButton("Copy to Clipboard");
copyButton.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(messageText), null);
}
});
JPanel buttonPanel = new JPanel();
buttonPanel.add(okButton);
buttonPanel.add(copyButton);
this.dialog = new XBayaDialog(this.xbayaGUI, "Notification", infoPanel, buttonPanel);
this.dialog.setDefaultButton(okButton);
}
Aggregations