List of usage examples for javax.swing SwingConstants EAST
int EAST
To view the source code for javax.swing SwingConstants EAST.
Click Source Link
From source file:op.care.info.DlgDiag.java
private void btnAddHospitalActionPerformed(ActionEvent e) { final PnlEditHospital pnlHospital = new PnlEditHospital(new Hospital()); JidePopup popup = GUITools.createPanelPopup(pnlHospital, new Closure() { @Override//from w w w. j ava2s . c o m public void execute(Object o) { if (o != null) { Hospital hospital = EntityTools.merge((Hospital) o); cmbKH.setModel(new DefaultComboBoxModel(new Hospital[] { hospital })); } } }, btnAddHospital); GUITools.showPopup(popup, SwingConstants.EAST); }
From source file:op.care.prescription.DlgRegular.java
private void btnAddGPActionPerformed(ActionEvent e) { final PnlEditGP pnlGP = new PnlEditGP(new GP()); JidePopup popup = GUITools.createPanelPopup(pnlGP, new Closure() { @Override//from w w w . j av a2 s . c o m public void execute(Object o) { if (o != null) { cmbDocON.setModel(new DefaultComboBoxModel(new GP[] { (GP) o })); } } }, btnAddGP); GUITools.showPopup(popup, SwingConstants.EAST); }
From source file:op.care.prescription.DlgRegular.java
private void btnAddHospitalActionPerformed(ActionEvent e) { final PnlEditHospital pnlHospital = new PnlEditHospital(new Hospital()); JidePopup popup = GUITools.createPanelPopup(pnlHospital, new Closure() { @Override/*from w w w. j a v a2 s . com*/ public void execute(Object o) { if (o != null) { cmbHospitalON.setModel(new DefaultComboBoxModel(new Hospital[] { (Hospital) o })); } } }, btnAddHospital); GUITools.showPopup(popup, SwingConstants.EAST); }
From source file:org.drugis.addis.gui.components.progressgraph.ProgressGraph.java
public JPanel createPanel() { final FormLayout layout = new FormLayout(createFormSpec("pref", d_numCols), "p, " + createFormSpec("3dlu, p", d_numTotalRows - 1)); CellConstraints cc = new CellConstraints(); JPanel progressPanel = new JPanel(layout); Dimension cellSize = new Dimension(d_edgeLength, d_arrowSize); Dimension circleSize = new Dimension(d_circleDiameter, d_circleDiameter); for (int i = 0; i < d_numberOfChains; ++i) { int rowIdx = (2 * i) + 1; Task tuningTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.TUNING_CHAIN_PREFIX + i); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), cc.xy(6, rowIdx)); progressPanel.add(new GraphProgressNode(d_gridCellSize, tuningTask), cc.xy(7, rowIdx)); Task simulationTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.SIMULATION_CHAIN_PREFIX + i); progressPanel.add(new GraphLine(new Dimension(d_edgeLength * 2, d_arrowSize), 2, SwingConstants.EAST), cc.xy(9, rowIdx));// www.ja va2 s.c om progressPanel.add(new GraphProgressNode(d_gridCellSize, simulationTask), cc.xy(10, rowIdx)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), cc.xy(11, rowIdx)); } /** Placement needed for the calculated preferred size */ progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.START), centerCell(cc, d_numMainRows, 1)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 2)); Task startTask = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.STARTING_SIMULATION_PHASE); progressPanel.add(new GraphProgressNode(d_gridCellSize, startTask, false), centerCell(cc, d_numMainRows, 3)); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 4)); //NOTE: it is a mystery why numMainRows - 1 is the correct count instead of just numMainRows progressPanel.add( new GraphBar(new Dimension(d_barWidth, (int) progressPanel.getPreferredSize().getHeight())), centerCell(cc, d_numMainRows - 1, 5)); progressPanel.add( new GraphBar(new Dimension(d_barWidth, (int) progressPanel.getPreferredSize().getHeight())), centerCell(cc, d_numMainRows - 1, 12)); Task assessConvergence = d_model.getModel().getActivityTask().getModel() .getStateByName(MCMCModel.CALCULATING_SUMMARIES_PHASE); progressPanel.add(new GraphLine(cellSize, 2, SwingConstants.EAST), centerCell(cc, d_numMainRows, 13)); progressPanel.add(new GraphProgressNode(d_gridCellSize, assessConvergence, false), centerCell(cc, d_numMainRows, 14)); progressPanel.add(new GraphLine(new Dimension(d_arrowSize, 50), 2, SwingConstants.SOUTH), cc.xywh(14, d_numMainRows / 2 + 2, 1, d_numMainRows / 2 + 1, CellConstraints.CENTER, CellConstraints.BOTTOM)); progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.DECISION), cc.xywh(14, d_numMainRows + 2, 1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); progressPanel.add( new GraphLine(new Dimension((int) (d_edgeLength + (d_edgeLength)), d_arrowSize), 2, SwingConstants.EAST), cc.xyw(14, d_numMainRows + 2, 2, CellConstraints.RIGHT, CellConstraints.DEFAULT)); progressPanel.add(new GraphSimpleNode(circleSize, GraphSimpleNodeType.END), cc.xy(16, d_numMainRows + 2)); progressPanel.add(new GraphLine(new Dimension(d_edgeLength * 9, d_arrowSize), 2, SwingConstants.WEST), cc.xyw(10, d_numMainRows + 2, 14 - 7, CellConstraints.LEFT, CellConstraints.DEFAULT)); progressPanel.add(new GraphBar(new Dimension(d_edgeLength * 2, d_barWidth)), cc.xy(9, d_numMainRows + 2)); int totalHeight = (int) progressPanel.getPreferredSize().getHeight(); progressPanel.add( new GraphConnector(new Dimension(d_edgeLength * 2, totalHeight), d_cellHeight + Sizes.DLUY3.getPixelSize(progressPanel), totalHeight - 30, d_numberOfChains), cc.xywh(9, 1, 1, d_numTotalRows)); PanelBuilder builder = new PanelBuilder(new FormLayout("pref", "p")); builder.setDefaultDialogBorder(); builder.add(progressPanel); return builder.getPanel(); }
From source file:unikn.dbis.univis.visualization.graph.VGraph.java
/** * @param source Source where the edge is starting. * @param target Target where the edge is ending. *///from www. j a v a2 s . c o m public void createEdges(VGraphCell source, VGraphCell target) { DefaultEdge edge = new DefaultEdge(); if (layout.getOrientation() == SwingConstants.NORTH) { edge.setSource(source.getChildAt(1)); edge.setTarget(target.getChildAt(0)); } else if (layout.getOrientation() == SwingConstants.WEST) { edge.setSource(source.getChildAt(3)); edge.setTarget(target.getChildAt(2)); } else if (layout.getOrientation() == SwingConstants.SOUTH) { edge.setSource(source.getChildAt(0)); edge.setTarget(target.getChildAt(1)); } else if (layout.getOrientation() == SwingConstants.EAST) { edge.setSource(source.getChildAt(2)); edge.setTarget(target.getChildAt(3)); } GraphConstants.setLineEnd(edge.getAttributes(), GraphConstants.ARROW_CLASSIC); GraphConstants.setEndFill(edge.getAttributes(), true); cache.insert(edge); }
From source file:unikn.dbis.univis.visualization.graph.VGraph.java
public void rotateRight() { if ((SwingConstants.NORTH) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.EAST); } else if ((SwingConstants.EAST) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.SOUTH); } else if ((SwingConstants.SOUTH) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.WEST); } else if ((SwingConstants.WEST) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.NORTH); }//from ww w. j av a 2 s. c om rotateGraph(); }
From source file:unikn.dbis.univis.visualization.graph.VGraph.java
public void rotateLeft() { if ((SwingConstants.NORTH) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.WEST); } else if ((SwingConstants.WEST) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.SOUTH); } else if ((SwingConstants.SOUTH) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.EAST); } else if ((SwingConstants.EAST) == getLayoutOrientation()) { setLayoutOrientation(SwingConstants.NORTH); }//w ww . j a v a 2s.co m rotateGraph(); }