FlowLayout layout = (FlowLayout)southPanel.getLayout(); layout.setVgap(0);
centerFrame.setBorder(new LineBorder(Color.BLUE, 6)); FlowLayout flow = (FlowLayout)centerFrame.getLayout(); flow.setHgap(0); flow.setVgap(0);
private JPanel getTitlePanel() { if (panelTitle == null) { final FlowLayout flowLayout1 = new FlowLayout(); flowLayout1.setVgap(10); panelTitle = new JPanel(); panelTitle.setLayout(flowLayout1); panelTitle.setPreferredSize(new Dimension(100, 50)); panelTitle.setName("panelTitle"); panelTitle.add(getLabelTitle(), null); } return panelTitle; }
@ScriptFunction public void setVgap(int aValue) { ((FlowLayout) super.getLayout()).setVgap(aValue); super.revalidate(); super.repaint(); }
private JPanel getPanelTitle() { if (panelTitle == null) { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(10); flowLayout.setAlignment(FlowLayout.LEFT); flowLayout.setVgap(10); panelTitle = new JPanel(); panelTitle.setLayout(flowLayout); panelTitle.setPreferredSize(new Dimension(40, 30)); panelTitle.add(getLabelTitle(), null); } return panelTitle; }
private JPanel getButtonPanel() { if (panelButtons == null) { final FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(10); flowLayout.setVgap(10); panelButtons = new JPanel(); panelButtons.setLayout(flowLayout); panelButtons.setPreferredSize(new Dimension(100, 50)); panelButtons.setName("buttonPanel"); panelButtons.add(getButtonCancel(), null); } return panelButtons; }
/** * Creates the Dialog and returns the Result * @param MessageOption that was pressed */ private int showConfirmDialog() { JTextField tf = new JTextField(); JPanel calPanel = new JPanel(); FlowLayout layout = new FlowLayout(); layout.setAlignment(FlowLayout.LEFT); layout.setHgap(0); layout.setVgap(0); calPanel.setLayout(layout); calPanel.add(_calendarBox); Object[] msg = { _message, calPanel }; int result = JOptionPane.showConfirmDialog(_parentComponent, msg, _title, _optionType, _messageType); return result; } }
protected JComponent createButtonPanel() { JPanel btnPanel = new JPanel(); btnPanel.setBorder( BorderFactory.createEmptyBorder( 4, 0, 0, 0 ) ); FlowLayout layout = new FlowLayout(); layout.setVgap( 0 ); btnPanel.setLayout( layout ); _btnClose = createCloseButton(); getRootPane().setDefaultButton( _btnClose ); _btnClose.addActionListener( e -> close() ); mapCancelKeystroke( "Close", this::close ); btnPanel.add( _btnClose ); return btnPanel; }
public JPanel getRow(String row) { if (row == null) { row = "a1"; } if (row.equals(CommandMenuItems.CUSTOM_COMMANDS_SUBMENU)) { row = "b1"; } if (!rows.containsKey(row)) { JPanel newRow = new JPanel(); ((FlowLayout)(newRow.getLayout())).setVgap(4); // This should be default, but just to be clear ((FlowLayout)(newRow.getLayout())).setHgap(5); if (row.startsWith("a")) { primary.add(newRow); } else { secondary.add(newRow); } rows.put(row, newRow); } return rows.get(row); }
private JPanel getPanelButtons() { if (panelButtons == null) { final FlowLayout flowLayout2 = new FlowLayout(); flowLayout2.setAlignment(FlowLayout.RIGHT); flowLayout2.setVgap(10); flowLayout2.setHgap(10); panelButtons = new JPanel(); panelButtons.setLayout(flowLayout2); panelButtons.setPreferredSize(new Dimension(200, 45)); panelButtons.add(getCheckBoxIncludeSubdirs(), null); panelButtons.add(getButtonCancel(), null); panelButtons.add(getButtonOK(), null); } return panelButtons; }
/** * Constructor. * * @param label fixed label text */ public JLabelledValue(String label) { FlowLayout flowLayout = (FlowLayout) getLayout(); flowLayout.setAlignment(FlowLayout.LEFT); flowLayout.setVgap(0); flowLayout.setHgap(0); JLabel textLabel = new JLabel(label); textLabel.setFont(new Font("Tahoma", Font.BOLD, 11)); textLabel.setPreferredSize(new Dimension(70, 14)); add(textLabel); m_valueLabel = new JLabel(""); m_valueLabel.setPreferredSize(new Dimension(80, 14)); add(m_valueLabel); }
/** * Constructor. * * @param label fixed label text */ public JLabelledValue(String label) { FlowLayout flowLayout = (FlowLayout) getLayout(); flowLayout.setAlignment(FlowLayout.LEFT); flowLayout.setVgap(0); flowLayout.setHgap(0); JLabel textLabel = new JLabel(label); textLabel.setFont(new Font("Tahoma", Font.BOLD, 11)); textLabel.setPreferredSize(new Dimension(70, 14)); add(textLabel); m_valueLabel = new JLabel(""); m_valueLabel.setPreferredSize(new Dimension(80, 14)); add(m_valueLabel); }
/** Creates the ui. */ private void createUI() { scaleGroupPanel = new JPanel(); FlowLayout flowLayout = (FlowLayout) scaleGroupPanel.getLayout(); flowLayout.setVgap(0); flowLayout.setHgap(0); scaleGroupPanel.setBorder( BorderFactory.createTitledBorder( Localisation.getString(ScaleTool.class, "ScaleTool.scale"))); scaleButton = new ToolButton( Localisation.getString(ScaleTool.class, "ScaleTool.scale"), "tool/scaletool.png"); scaleGroupPanel.add(scaleButton); scaleButton.setEnabled(false); scaleButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { ScaleToolPanel scalePanel = new ScaleToolPanel(application); scalePanel.populate(sldDataList); scalePanel.setVisible(true); } }); scaleGroupPanel.setPreferredSize(new Dimension(PANEL_WIDTH, ToolPanel.TOOL_PANEL_HEIGHT)); }
/** Creates the ui. */ private void createUI() { groupPanel = new JPanel(); FlowLayout flowLayout = (FlowLayout) groupPanel.getLayout(); flowLayout.setVgap(0); flowLayout.setHgap(0); TitledBorder titledBorder = BorderFactory.createTitledBorder( Localisation.getString(MapBoxTool.class, "MapBoxTool.groupTitle")); groupPanel.setBorder(titledBorder); // Export to SLD exportToSLDButton = new ToolButton( Localisation.getString(MapBoxTool.class, "MapBoxTool.exportToSLD"), "tool/exporttosld.png"); exportToSLDButton.setEnabled(false); exportToSLDButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { exportToSLD(); } }); groupPanel.setPreferredSize(new Dimension(PANEL_WIDTH, ToolPanel.TOOL_PANEL_HEIGHT)); groupPanel.add(exportToSLDButton); }
/** * Return the ButtonPanelFlowLayout property value. * @return java.awt.FlowLayout */ /* WARNING: THIS METHOD WILL BE REGENERATED. */ private java.awt.FlowLayout getButtonPanelFlowLayout() { java.awt.FlowLayout ivjButtonPanelFlowLayout = null; try { /* Create part */ ivjButtonPanelFlowLayout = new java.awt.FlowLayout(); ivjButtonPanelFlowLayout.setAlignment(java.awt.FlowLayout.LEFT); ivjButtonPanelFlowLayout.setVgap(5); ivjButtonPanelFlowLayout.setHgap(10); } catch (java.lang.Throwable ivjExc) { handleException(ivjExc); }; return ivjButtonPanelFlowLayout; } /**
public static void init(FlowLayout comp, Thing thing, Container parent, ActionContext actionContext){ Integer hgap = JavaCreator.createInteger(thing, "hgap"); if(hgap != null){ comp.setHgap(hgap); } Integer vgap = JavaCreator.createInteger(thing, "vgap"); if(vgap != null){ comp.setVgap(vgap); } Integer align = null; String v = thing.getString("align"); if("CENTER".equals(v)){ align = FlowLayout.CENTER; }else if("LEADING".equals(v)){ align = FlowLayout.LEADING; }else if("LEFT".equals(v)){ align = FlowLayout.LEFT; }else if("RIGHT".equals(v)){ align = FlowLayout.RIGHT; }else if("TRAILING".equals(v)){ align = FlowLayout.TRAILING; } if(align != null){ comp.setAlignment(align); } } }
public LocationButtonsPanel(JTextField textFieldX, JTextField textFieldY, JTextField textFieldZ, JTextField textFieldC) { FlowLayout flowLayout = (FlowLayout) getLayout(); flowLayout.setVgap(0); flowLayout.setHgap(2); this.textFieldX = textFieldX; this.textFieldY = textFieldY; this.textFieldZ = textFieldZ; this.textFieldC = textFieldC; buttonCaptureCamera = new JButton(captureCameraCoordinatesAction); buttonCaptureCamera.setHideActionText(true); add(buttonCaptureCamera); buttonCaptureTool = new JButton(captureToolCoordinatesAction); buttonCaptureTool.setHideActionText(true); add(buttonCaptureTool); JButton buttonCenterCamera = new JButton(positionCameraAction); buttonCenterCamera.setHideActionText(true); add(buttonCenterCamera); buttonCenterTool = new JButton(positionToolAction); buttonCenterTool.setHideActionText(true); add(buttonCenterTool); buttonCenterToolNoSafeZ = new JButton(positionToolNoSafeZAction); buttonCenterToolNoSafeZ.setHideActionText(true); setActuatorName(null); }
@Override protected List<Entry<String, JComponent>> getFormElements() { final List<Entry<String, JComponent>> result = super.getFormElements(); result.add(new ImmutableEntry<>("Salesforce username", _usernameTextField)); result.add(new ImmutableEntry<>("Salesforce password", _passwordTextField)); final DCPanel securityTokenPanel = new DCPanel(Color.WHITE); final FlowLayout layout = (FlowLayout) securityTokenPanel.getLayout(); layout.setVgap(0); layout.setHgap(0); final HelpIcon securityTokenHelpIcon = new HelpIcon("Your security token is set on Salesforce.com by going " + "to: <b><i>Your Name</i> | Setup | My Personal Information | Reset Security Token</b>.<br/>This " + "security token is needed in order to use the Salesforce.com web services."); securityTokenHelpIcon.setBorder(WidgetUtils.BORDER_EMPTY); _securityTokenTextField.setBorder(WidgetUtils.BORDER_EMPTY); securityTokenPanel.add(_securityTokenTextField); securityTokenPanel.add(securityTokenHelpIcon); result.add(new ImmutableEntry<>("Salesforce security token", securityTokenPanel)); result.add(new ImmutableEntry<>("Endpoint", _endpointUrlComboBox)); return result; }
@Override protected List<Entry<String, JComponent>> getFormElements() { final List<Entry<String, JComponent>> result = super.getFormElements(); final DCPanel baseUrlPanel = new DCPanel(Color.WHITE); final FlowLayout layout = (FlowLayout) baseUrlPanel.getLayout(); layout.setVgap(0); layout.setHgap(0); final HelpIcon baseUrlHelpIcon = new HelpIcon( "The base URL is the first part of any URL that you use when you access the SugarCRM system."); baseUrlHelpIcon.setBorder(WidgetUtils.BORDER_EMPTY); _baseUrlTextField.setBorder(WidgetUtils.BORDER_EMPTY); baseUrlPanel.add(_baseUrlTextField); baseUrlPanel.add(baseUrlHelpIcon); result.add(new ImmutableEntry<>("Salesforce security token", baseUrlPanel)); result.add(new ImmutableEntry<>("Salesforce username", _usernameTextField)); result.add(new ImmutableEntry<>("Salesforce password", _passwordTextField)); return result; }
public WtoolBar(String barName, int position) { FlowLayout flowLayout = (FlowLayout) getLayout(); flowLayout.setVgap(0); flowLayout.setHgap(0); flowLayout.setAlignment(FlowLayout.LEADING); this.barName = barName; this.barPosition = position; this.setAlignmentX(LEFT_ALIGNMENT); this.setAlignmentY(TOP_ALIGNMENT); setOpaque(false); addSeparator(SEPARATOR_2x24); }