arrowDownPanel.setAlignmentY(Component.TOP_ALIGNMENT); MediatorGui.tabConsoles().setAlignmentX(FlowLayout.LEADING); MediatorGui.tabConsoles().setAlignmentY(Component.TOP_ALIGNMENT);
panelCombo.setAlignmentY(Component.BOTTOM_ALIGNMENT); tabsBottom.setAlignmentX(FlowLayout.LEADING); tabsBottom.setAlignmentY(Component.BOTTOM_ALIGNMENT);
JPanel jpTop = new JPanel(new BorderLayout()); jbStop = new JButton("Cancel"); JPanel extraPanel = new JPanel(); extraPanel.setLayout(new BoxLayout(extraPanel, BoxLayout.X_AXIS)); extraPanel.setAlignmentY(Component.CENTER_ALIGNMENT); extraPanel.add(jbStop); jpTop .add(extraPanel, BorderLayout.EAST);
private JPanel getDescriptionPanel() { if (descriptionPanel == null) { descriptionPanel = new JPanel(); descriptionPanel.setAlignmentY(Component.CENTER_ALIGNMENT); descriptionPanel.setLayout(new BoxLayout(descriptionPanel, BoxLayout.Y_AXIS)); descriptionPanel.setBorder(BorderFactory.createEtchedBorder()); for (int i = 0; i < 3; i++) { descriptionPanel.add(getDescriptionLabel(i)); } } return descriptionPanel; }
public class ButtonsPanel extends JPanel { public ButtonsPanel() { setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); add(Box.createHorizontalStrut(50)); JPanel butts = new JPanel(); butts.setLayout(new BoxLayout(butts, BoxLayout.Y_AXIS)); butts.add(Box.createVerticalStrut(30)); for (int i = 0; i < 5; i++) { JButton butt = new JButton("Button " + String.valueOf(i)); butts.add(butt); butts.add(Box.createVerticalStrut(10)); } butts.setAlignmentY(JPanel.TOP_ALIGNMENT); butts.add(Box.createVerticalStrut(40)); add(butts); add(Box.createHorizontalStrut(50)); } }
/** * Add any screen sub-panel(s) now. * You might want to override this to create an alternate parent screen. * @param parent The parent to add the new screen to. */ public boolean addSubPanels(Container parent) { // There may be a better way of doing this, but this makes the screen top justified. parent.setLayout(new BoxLayout(parent, BoxLayout.X_AXIS)); JPanel panelLeftTop = new JPanel(); panelLeftTop.setOpaque(false); panelLeftTop.setAlignmentY(JLabel.TOP_ALIGNMENT); parent.add(panelLeftTop); JPanel panelLeft = new JPanel(); panelLeft.setOpaque(false); panelLeftTop.add(panelLeft); return super.addSubPanels(panelLeft); } /**
/** * Add any screen sub-panel(s) now. * You might want to override this to create an alternate parent screen. * @param parent The parent to add the new screen to. */ public boolean addSubPanels(Container parent) { // There may be a better way of doing this, but this makes the screen top justified. parent.setLayout(new BoxLayout(parent, BoxLayout.X_AXIS)); JPanel panelLeftTop = new JPanel(); panelLeftTop.setOpaque(false); panelLeftTop.setAlignmentY(JLabel.TOP_ALIGNMENT); parent.add(panelLeftTop); JPanel panelLeft = new JPanel(); panelLeft.setOpaque(false); panelLeftTop.add(panelLeft); super.addSubPanels(panelLeft); return true; } /**
public CheckBoxNodeRenderer(TreePacksPanel t) { selectionForeground = UIManager.getColor("Tree.selectionForeground"); selectionBackground = UIManager.getColor("Tree.selectionBackground"); textForeground = UIManager.getColor("Tree.textForeground"); textBackground = UIManager.getColor("Tree.textBackground"); treePacksPanel = t; int treeWidth = t.getTree().getPreferredSize().width; int height = checkbox.getPreferredSize().height; int cellWidth = treeWidth - treeWidth / 4; //Don't touch, it fixes various layout bugs in swing/awt rendererPanel.setLayout(new BorderLayout(0, 0)); rendererPanel.setBackground(textBackground); rendererPanel.add(BorderLayout.WEST, checkbox); rendererPanel.setAlignmentX((float) 0); rendererPanel.setAlignmentY((float) 0); rendererPanel.add(BorderLayout.EAST, packSizeLabel); rendererPanel.setMinimumSize(new Dimension(cellWidth, height)); rendererPanel.setPreferredSize(new Dimension(cellWidth, height)); rendererPanel.setSize(new Dimension(cellWidth, height)); rendererPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); }
public JPanel getCtrlSearchPanel() { final JPanel panel5 = new JPanel(); panel5.setAlignmentY(Component.TOP_ALIGNMENT); panel5.setAlignmentX(Component.LEFT_ALIGNMENT); panel5.setLayout(new FlowLayout(FlowLayout.LEFT, 15, 10)); panel5.add(Box.createHorizontalStrut(350)); JButton clearBtn = new JButton(Messages.getString("DicomQrView.clear")); //$NON-NLS-1$ clearBtn.setToolTipText(Messages.getString("DicomQrView.clear_search")); //$NON-NLS-1$ clearBtn.addActionListener(e -> clearItems()); panel5.add(clearBtn); JButton searchBtn = new JButton(Messages.getString("DicomQrView.search")); //$NON-NLS-1$ searchBtn.setToolTipText(Messages.getString("DicomQrView.tips_dcm_query")); //$NON-NLS-1$ searchBtn.addActionListener(e -> cfind()); panel5.add(searchBtn); return panel5; }
public JPanel getMarkerPanel() { final JPanel transform = new JPanel(); transform.setAlignmentY(Component.TOP_ALIGNMENT); transform.setAlignmentX(Component.LEFT_ALIGNMENT); transform.setLayout(new BoxLayout(transform, BoxLayout.Y_AXIS)); transform.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 3, 0, 3), new TitledBorder(null, "Markers", //$NON-NLS-1$ TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, FontTools.getFont12Bold(), Color.GRAY))); JPanel panel1 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); transform.add(panel1); transform.add(Box.createVerticalStrut(5)); jtableMarker = createMultipleRenderingTable(new SimpleTableModel(new String[] {}, new Object[][] {})); jtableMarker.setFont(FontTools.getFont10()); jtableMarker.getTableHeader().setReorderingAllowed(false); tableMarkerContainer.setBorder(BorderFactory.createEtchedBorder()); tableMarkerContainer.setPreferredSize(new Dimension(50, 80)); tableMarkerContainer.setLayout(new BorderLayout()); transform.add(tableMarkerContainer); return transform; }
public final JPanel getAnnotationsPanel() { final JPanel transform = new JPanel(); transform.setAlignmentY(Component.TOP_ALIGNMENT); transform.setAlignmentX(Component.LEFT_ALIGNMENT); transform.setLayout(new BoxLayout(transform, BoxLayout.Y_AXIS)); transform.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 3, 0, 3), new TitledBorder(null, "Annotations", //$NON-NLS-1$ TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, FontTools.getFont12Bold(), Color.GRAY))); JPanel panel1 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); transform.add(panel1); transform.add(Box.createVerticalStrut(5)); jtableTag = createMultipleRenderingTable(new SimpleTableModel(new String[] {}, new Object[][] {})); jtableTag.setFont(FontTools.getFont10()); jtableTag.getTableHeader().setReorderingAllowed(false); tableTagContainer.setBorder(BorderFactory.createEtchedBorder()); tableTagContainer.setPreferredSize(new Dimension(50, 80)); tableTagContainer.setLayout(new BorderLayout()); transform.add(tableTagContainer); return transform; }
public ContrastPanel() { super(); setLayout(new BorderLayout()); setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); autoLevelListener = new AutoLevelListener(); autoLevelBtn.addActionListener(autoLevelListener); contrastPanel = new ContrastComponent(this); brightnessPanel = new BrightnessComponent(this); JPanel content = new JPanel(new GridLayout(3, 1, 0, 10)); content.setAlignmentX(Component.LEFT_ALIGNMENT); content.setAlignmentY(Component.TOP_ALIGNMENT); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); content.add(contrastPanel); content.add(brightnessPanel); content.add(autoLevelBtn); add(content, BorderLayout.NORTH); }
public JPanel getArchivePanel() { final JPanel sPanel = new JPanel(); sPanel.setAlignmentY(Component.TOP_ALIGNMENT); sPanel.setAlignmentX(Component.LEFT_ALIGNMENT); sPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3)); JLabel lblDest = new JLabel(Messages.getString("DicomQrView.arc") + StringUtil.COLON); //$NON-NLS-1$ sPanel.add(lblDest); JMVUtils.setPreferredWidth(comboDestinationNode, 185, 185); AbstractDicomNode.addTooltipToComboList(comboDestinationNode); sPanel.add(comboDestinationNode); sPanel.add(Box.createHorizontalStrut(10)); JLabel lblTetrieve = new JLabel(Messages.getString("DicomQrView.retrieve") + StringUtil.COLON); //$NON-NLS-1$ sPanel.add(lblTetrieve); comboDicomRetrieveType.setToolTipText(Messages.getString("DicomQrView.msg_sel_type")); //$NON-NLS-1$ sPanel.add(comboDicomRetrieveType); return sPanel; }
public JPanel getSelectedMeasurePanel() { final JPanel transform = new JPanel(); transform.setAlignmentY(Component.TOP_ALIGNMENT); transform.setAlignmentX(Component.LEFT_ALIGNMENT); transform.setLayout(new BoxLayout(transform, BoxLayout.Y_AXIS)); transform.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 3, 0, 3), new TitledBorder(null, Messages.getString("MeasureTool.sel"), //$NON-NLS-1$ TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, FontTools.getFont12Bold(), Color.GRAY))); JPanel panel1 = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); transform.add(panel1); transform.add(Box.createVerticalStrut(5)); jtable = createMultipleRenderingTable(new SimpleTableModel(new String[] {}, new Object[][] {})); jtable.setFont(FontTools.getFont10()); jtable.getTableHeader().setReorderingAllowed(false); tableContainer = new JPanel(); tableContainer.setBorder(BorderFactory.createEtchedBorder()); tableContainer.setPreferredSize(new Dimension(50, 80)); tableContainer.setLayout(new BorderLayout()); transform.add(tableContainer); return transform; }
public JPanel getResetPanel() { final JPanel panel2 = new JPanel(); panel2.setAlignmentY(Component.TOP_ALIGNMENT); panel2.setAlignmentX(Component.LEFT_ALIGNMENT); panel2.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3)); panel2.setBorder( BorderFactory.createCompoundBorder(spaceY, new TitledBorder(null, Messages.getString("ResetTools.reset"), //$NON-NLS-1$ TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, TITLE_FONT, TITLE_COLOR))); final JComboBox resetComboBox = new JComboBox(ResetTools.values()); panel2.add(resetComboBox); final JButton resetButton = new JButton(); resetButton.setText(Messages.getString("ResetTools.reset")); //$NON-NLS-1$ resetButton .addActionListener(e -> EventManager.getInstance().reset((ResetTools) resetComboBox.getSelectedItem())); panel2.add(resetButton); ActionState resetAction = EventManager.getInstance().getAction(ActionW.RESET); if (resetAction != null) { resetAction.registerActionState(resetButton); } return panel2; }
public JPanel getResetPanel() { final JPanel panel2 = new JPanel(); panel2.setAlignmentY(Component.TOP_ALIGNMENT); panel2.setAlignmentX(Component.LEFT_ALIGNMENT); panel2.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3)); panel2.setBorder( BorderFactory.createCompoundBorder(spaceY, new TitledBorder(null, Messages.getString("ImageTool.reset"), //$NON-NLS-1$ TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, TITLE_FONT, TITLE_COLOR))); final JComboBox resetComboBox = new JComboBox(ResetTools.values()); panel2.add(resetComboBox); final JButton resetButton = new JButton(); resetButton.setText(Messages.getString("ImageTool.reset")); //$NON-NLS-1$ resetButton .addActionListener(e -> EventManager.getInstance().reset((ResetTools) resetComboBox.getSelectedItem())); panel2.add(resetButton); ActionState resetAction = EventManager.getInstance().getAction(ActionW.RESET); if (resetAction != null) { resetAction.registerActionState(resetButton); } return panel2; }
public JPanel getCallingNodePanel() { final JPanel sPanel = new JPanel(); sPanel.setAlignmentY(Component.TOP_ALIGNMENT); sPanel.setAlignmentX(Component.LEFT_ALIGNMENT); sPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3)); final JLabel lblDest = new JLabel(Messages.getString("DicomQrView.calling_node") + StringUtil.COLON); //$NON-NLS-1$ sPanel.add(lblDest); JMVUtils.setPreferredWidth(comboCallingNode, 185, 185); AbstractDicomNode.addTooltipToComboList(comboCallingNode); sPanel.add(comboCallingNode); sPanel.add(Box.createHorizontalStrut(10)); final JButton btnGerenralOptions = new JButton(Messages.getString("DicomQrView.more_opt")); //$NON-NLS-1$ btnGerenralOptions.setAlignmentX(Component.LEFT_ALIGNMENT); sPanel.add(btnGerenralOptions); btnGerenralOptions.addActionListener(e -> { PreferenceDialog dialog = new PreferenceDialog(SwingUtilities.getWindowAncestor(this)); dialog.showPage(org.weasis.dicom.explorer.Messages.getString("DicomNodeListView.node_list")); //$NON-NLS-1$ JMVUtils.showCenterScreen(dialog); initNodeList(); }); return sPanel; }
private void jbInit() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(getWindowLevelPanel()); add(getTransformPanel()); add(getSlicePanel()); add(getResetPanel()); final JPanel panel1 = new JPanel(); panel1.setAlignmentY(Component.TOP_ALIGNMENT); panel1.setAlignmentX(Component.LEFT_ALIGNMENT); panel1.setLayout(new GridBagLayout()); add(panel1); }
private void jbInit() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); add(getWindowLevelPanel()); add(getTransformPanel()); add(getSlicePanel()); add(getResetPanel()); final JPanel panel1 = new JPanel(); panel1.setAlignmentY(Component.TOP_ALIGNMENT); panel1.setAlignmentX(Component.LEFT_ALIGNMENT); panel1.setLayout(new GridBagLayout()); add(panel1); }
/** * Create the button panel. */ public JPanel createButtonPanel(BaseApplet applet) { JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); buttonPanel.setOpaque(false); buttonPanel.setAlignmentX(LEFT_ALIGNMENT); buttonPanel.setAlignmentY(TOP_ALIGNMENT); ButtonGroup buttonGroup = new ButtonGroup(); //? this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.TOUR, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.AIR, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.HOTEL, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.LAND, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.CAR, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.TRANSPORTATION, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.CRUISE, false); this.addSearchButton(applet, buttonGroup, buttonPanel, ProductConstants.ITEM, false); return buttonPanel; } /**