List of usage examples for javax.swing JSplitPane RIGHT
String RIGHT
To view the source code for javax.swing JSplitPane RIGHT.
Click Source Link
Component
to the right of the other Component
. From source file:org.porphyry.view.Opener.java
public Opener(PortfolioFrame portfolio, String title) { super(portfolio, portfolio.localize(title)); this.portfolio = portfolio; this.add(new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, this.leftPanel, this.rightPanel)); Portfolio model = portfolio.getModel(); try {/* w ww. j a v a 2 s . c o m*/ this.populateList(model); } catch (Exception e) { e.printStackTrace(); //TODO } this.listView = new JSONList(listModel); this.display(this.listView, JSplitPane.RIGHT); this.display(new ActionButton("CANCEL", false), JSplitPane.RIGHT); this.display(new ActionButton("OPEN", true) { @Override public void onClick() { for (Object o : Opener.this.listView.getSelectedValues()) { Opener.this.open(((JSONObject) o).optString("id"), Opener.this.portfolio.getModel()); } super.onClick(); } }, JSplitPane.RIGHT); this.setBounds(0, 0, 640, 480); this.setVisible(true); }
From source file:org.porphyry.view.Opener.java
protected void display(Collection<JSONObject> c, String side) throws Exception { for (JSONObject o : c) { this.display(o.getString("name"), JSplitPane.RIGHT); }//from ww w . j a va2s . co m }
From source file:org.porphyry.view.Opener.java
protected void display(Component c, String side) { Box panel = (JSplitPane.RIGHT.equals(side)) ? this.rightPanel : this.leftPanel; panel.add(c);// w w w.ja v a 2 s. c o m }