use of javax.swing.border.EtchedBorder in project mc-dev by Bukkit.
the class ServerGUI method a.
private JComponent a() {
JPanel jpanel = new JPanel(new BorderLayout());
jpanel.add(new GuiStatsComponent(this.c), "North");
jpanel.add(this.b(), "Center");
jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Stats"));
return jpanel;
}
use of javax.swing.border.EtchedBorder in project mc-dev by Bukkit.
the class ServerGUI method b.
private JComponent b() {
PlayerListBox playerlistbox = new PlayerListBox(this.c);
JScrollPane jscrollpane = new JScrollPane(playerlistbox, 22, 30);
jscrollpane.setBorder(new TitledBorder(new EtchedBorder(), "Players"));
return jscrollpane;
}
use of javax.swing.border.EtchedBorder in project aerospike-client-java by aerospike.
the class GuiDisplay method initialize.
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frmAerospikeExamples = new JFrame();
frmAerospikeExamples.setTitle("Aerospike Java Client Examples");
frmAerospikeExamples.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frmAerospikeExamples.pack();
frmAerospikeExamples.getContentPane().setLayout(new BorderLayout(0, 0));
splitPane = new JSplitPane();
splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
frmAerospikeExamples.getContentPane().add(splitPane, BorderLayout.CENTER);
mainPanel = new JPanel();
splitPane.setLeftComponent(mainPanel);
mainPanel.setLayout(new BorderLayout(0, 0));
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
runButton = new JButton("Run");
runButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent ev) {
consoleTextArea.setText("");
run_selected_examples();
}
});
buttonPanel.add(runButton);
mainPanel.add(buttonPanel, BorderLayout.SOUTH);
exitButton = new JButton("Quit");
exitButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
Container Frame = exitButton.getParent();
do {
Frame = Frame.getParent();
} while (!(Frame instanceof JFrame));
((JFrame) Frame).dispose();
}
});
buttonPanel.add(exitButton);
sourceTextPane = new JTextArea();
sourceTextPane.setTabSize(2);
sourceTextPane.setEditable(false);
scrollPane = new JScrollPane(sourceTextPane);
scrollPane.setViewportBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
scrollPane.setPreferredSize(new Dimension(600, 100));
mainPanel.add(scrollPane, BorderLayout.CENTER);
connectionPanel = new JPanel();
connectionPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
lblServerHost = new JLabel("Server Host");
connectionPanel.add(lblServerHost);
seedHostTextField = new JTextField();
seedHostTextField.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
params.host = seedHostTextField.getText();
}
});
connectionPanel.add(seedHostTextField);
seedHostTextField.setColumns(10);
lblPort = new JLabel("Port");
connectionPanel.add(lblPort);
portTextField = new JTextField();
portTextField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent arg0) {
String newValue = namespaceTextField.getText();
if (newValue != null && newValue != "") {
try {
params.port = Integer.parseInt(newValue);
} catch (NumberFormatException ne) {
// ne.printStackTrace();
}
}
}
});
connectionPanel.add(portTextField);
portTextField.setColumns(4);
lblusername = new JLabel("User");
connectionPanel.add(lblusername);
usernameTextField = new JTextField();
usernameTextField.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
params.user = usernameTextField.getText();
}
});
connectionPanel.add(usernameTextField);
usernameTextField.setColumns(8);
lblpassword = new JLabel("Password");
connectionPanel.add(lblpassword);
passwordTextField = new JPasswordField();
passwordTextField.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
params.user = new String(passwordTextField.getPassword());
}
});
connectionPanel.add(passwordTextField);
passwordTextField.setColumns(8);
lblnameSpace = new JLabel("Namespace");
connectionPanel.add(lblnameSpace);
namespaceTextField = new JTextField();
namespaceTextField.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
params.namespace = namespaceTextField.getText();
}
});
connectionPanel.add(namespaceTextField);
namespaceTextField.setColumns(8);
lblSet = new JLabel("Set");
connectionPanel.add(lblSet);
txtSetTextfield = new JTextField();
txtSetTextfield.addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
params.set = txtSetTextfield.getText();
}
});
connectionPanel.add(txtSetTextfield);
txtSetTextfield.setColumns(8);
mainPanel.add(connectionPanel, BorderLayout.NORTH);
examplePanel = new JPanel();
examplePanel.setLayout(new BoxLayout(examplePanel, BoxLayout.Y_AXIS));
exampleScrollPane = new JScrollPane(examplePanel);
mainPanel.add(exampleScrollPane, BorderLayout.WEST);
// init values
seedHostTextField.setText(params.host);
portTextField.setText(Integer.toString(params.port));
namespaceTextField.setText(params.namespace);
txtSetTextfield.setText(params.set);
// int width = 785;
int width = 1000;
int height = 180;
consoleTextArea = new JTextArea();
consoleTextArea.setSize(new Dimension(width, height));
consoleTextArea.setEditable(false);
consoleScrollPane = new JScrollPane(consoleTextArea);
consoleScrollPane.setPreferredSize(new Dimension(width, height));
consoleScrollPane.setSize(new Dimension(width, height));
splitPane.setRightComponent(consoleScrollPane);
buttonGroup = new ButtonGroup();
JRadioButton jrb;
for (String example : Main.getAllExampleNames()) {
jrb = new JRadioButton(example);
jrb.setActionCommand(example);
jrb.addActionListener(this);
buttonGroup.add(jrb);
examplePanel.add(jrb);
}
frmAerospikeExamples.pack();
}
use of javax.swing.border.EtchedBorder in project vcell by virtualcell.
the class BatchRunDetailsPanel method getBottomPanel.
// end of method setupToolBar()
// set up bottom component function
public JPanel getBottomPanel() {
if (botPanel == null) {
botPanel = new JPanel();
botPanel.setLayout(new BorderLayout());
botPanel.add(getParameterScrollPanel(), BorderLayout.CENTER);
TitledBorder tb = new TitledBorder(new EtchedBorder(), "Parameters:", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", Font.PLAIN, 11));
botPanel.setBorder(tb);
}
return botPanel;
}
use of javax.swing.border.EtchedBorder in project vcell by virtualcell.
the class FRAPDiffOneParamPanel method showParameterEvaluation.
public void showParameterEvaluation() {
AsynchClientTask evaluateTask = new AsynchClientTask("Prepare to evaluate parameters ...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
String errorStr = checkParameters();
if (!errorStr.equals("")) {
throw new IllegalArgumentException(errorStr);
}
}
};
AsynchClientTask showResultTask = new AsynchClientTask("Showing profile likelihood and confidence intervals ...", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
ProfileData[] profileData = frapOptData.getExpFrapStudy().getProfileData_oneDiffComponent();
if (profileData != null && profileData.length > 0) {
// put plotpanes of different parameters' profile likelihoods into a base panel
JPanel basePanel = new JPanel();
basePanel.setLayout(new BoxLayout(basePanel, BoxLayout.Y_AXIS));
for (int i = 0; i < profileData.length; i++) {
ConfidenceIntervalPlotPanel plotPanel = new ConfidenceIntervalPlotPanel();
plotPanel.setProfileSummaryData(FRAPOptimizationUtils.getSummaryFromProfileData(profileData[i]));
plotPanel.setBorder(new EtchedBorder());
String paramName = "";
if (profileData[i].getProfileDataElements().size() > 0) {
paramName = profileData[i].getProfileDataElements().get(0).getParamName();
}
ProfileDataPanel profileDataPanel = new ProfileDataPanel(plotPanel, paramName);
basePanel.add(profileDataPanel);
}
JScrollPane scrollPane = new JScrollPane(basePanel);
scrollPane.setAutoscrolls(true);
scrollPane.setPreferredSize(new Dimension(620, 600));
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
// show plots in a dialog
DialogUtils.showComponentCloseDialog(FRAPDiffOneParamPanel.this, scrollPane, "Profile Likelihood of Parameters");
}
}
};
// dispatch
ClientTaskDispatcher.dispatch(FRAPDiffOneParamPanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { evaluateTask, showResultTask }, false, true, null, true);
}
Aggregations