public void setSize(int width, int height) { super.setSize(width, height); configureFormatter(); }
emptyPanel.setSize(0, 0);
private JPanel getArrowsPanel(UUID gameId) { if (!arrowPanels.containsKey(gameId)) { JPanel arrowPanel = new JPanel(); arrowPanel.setVisible(true); arrowPanel.setOpaque(false); arrowPanel.setLayout(null); arrowPanel.setSize(currentWidth, currentHeight); arrowPanels.put(gameId, arrowPanel); getArrowsManagerPanel().add(arrowPanel); return arrowPanel; } return arrowPanels.get(gameId); }
private void updateExamplesPanelSize() { Component scrollPane = examplesPanel.getParent(); int scrollPaneWidth = scrollPane.getWidth(); ExampleLayout exampleLayout = (ExampleLayout) examplesPanel.getLayout(); int contentsHeight = exampleLayout.calculateHeight(examplesPanel, scrollPaneWidth); examplesPanel.setSize(scrollPaneWidth, contentsHeight); }
@Override public void componentResized(ComponentEvent e) { int width = ((JComponent) e.getSource()).getWidth(); int height = ((JComponent) e.getSource()).getHeight(); jLayeredBackgroundPane.setSize(width, height); jSplitPane0.setSize(width, height); if (height < storedHeight) { pnlBattlefield.setSize(0, 200); } storedHeight = height; sizeToScreen(); if (!initialized) { String state = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_BIG_CARD_TOGGLED, null); if (state != null && state.equals("down")) { jSplitPane0.setDividerLocation(1.0); } initialized = true; } } });
@Override public void doLayout() { // Position transform and show source buttons buttonPanel.setLocation(cardXOffset, cardYOffset); buttonPanel.setSize(cardWidth, cardHeight); int x = cardWidth / 20; int y = cardHeight / 10; if (dayNightButton != null) { dayNightButton.setLocation(x, y); y += 25; y += 5; } if (showCopySourceButton != null) { showCopySourceButton.setLocation(x, y); } }
topPanel.setPreferredSize(d); topPanel.setMaximumSize(d); topPanel.setSize(d); topPanel.add(colorField, BorderLayout.WEST); hexPanel.setPreferredSize(d); hexPanel.setMaximumSize(d); hexPanel.setSize(d); hexField = new JTextField(); hexField.setFont(Theme.SMALL_BOLD_FONT); bottomPanel.setPreferredSize(d); bottomPanel.setMaximumSize(d); bottomPanel.setSize(d); bottomPanel.add(Box.createHorizontalStrut(77)); bottomPanel.add(rangeBox);
this.trackPanel.setSize(frameWidth, frameHeight); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, this.trackPanel, toolsPanel); splitPane.setDividerLocation(border + trackHeight / 2); displaySettingsPanel.setSize(80, frameHeight); displaySettingsPanel.setBorder(BorderFactory.createTitledBorder("display settings")); displaySettingsPanel.setLayout(new BorderLayout());
public void setSize(int w, int h) { super.setSize(w, h); width = w; height = h; }
private void addContentPanel() { JPanel p = new JPanel(); p.setLayout(new BorderLayout()); p.setSize(new Dimension(800, 600)); this.setContentPane(p); }
@Override public JComponent getOptionsGUI(JComponent mother) { JPanel com = new JPanel(); com.setSize(500, 60); JCheckBox synchBox = new JCheckBox(INCLUDE_ROUTES); synchBox.setSelected(true); synchBox.addItemListener(this); com.add(synchBox); return com; }
/** * Default constructor */ public TrackerInfo() { super.setLayout(new GridBagLayout()); super.setPreferredSize(new Dimension(600, 300)); super.setSize(600, 300); init(); }
/** * Default constructor */ public TrackerInfo() { super.setLayout(new GridBagLayout()); super.setPreferredSize(new Dimension(600, 300)); super.setSize(600, 300); this.init(); }
/** * Default constructor */ public TrackerInfo() { super.setLayout(new GridBagLayout()); super.setPreferredSize(new Dimension(600, 300)); super.setSize(600, 300); init(); }
@Override public JPanel newComponentPanel() { panel = Panels.newRoundedPanel(); panelCloseButton = Buttons.newPanelCloseButton(getClosePopoverAction()); panel.add(panelCloseButton, "aligny top, alignx right,shrink,wrap"); panel.add(Panels.newLanguageChange(), "align center,grow,wrap"); // Set size panel.setSize(MultiBitUI.POPOVER_PREF_WIDTH, MultiBitUI.POPOVER_PREF_HEIGHT); return panel; }
@Override public void setSize(final int width, final int height) { final boolean sizeChanged = getWidth() != width || getHeight() != height; if(sizeChanged) { super.setSize(width, height); validate(); } }