Refine search
@Override public void run() { label.setBackground(PROGRESS_COLOR); label.setToolTipText("Running..."); label.setBorder(javax.swing.BorderFactory.createLineBorder(new Color(0, 0, 0))); label.setOpaque(true); messagePanel.add(label); messagePanel.revalidate(); } });
private void runButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runButtonActionPerformed final Main.Config config = new Main.Config(uriField.getText(), syncRadio.isSelected(), Integer.parseInt(requestCountField.getText())); runButton.setEnabled(false); finishStatusLabel.setText(" "); successRateStatusLabel.setText(" "); messagePanel.removeAll(); messagePanel.revalidate(); messagePanel.repaint(); Executors.newSingleThreadExecutor().submit(new Runnable() { @Override public void run() { sendMessages(config); } }); }//GEN-LAST:event_runButtonActionPerformed
/** * Creates new form MainWindow */ public MainWindow() { initComponents(); uriField.setText(Main.Config.DEFAULT_BASE_URI); ((FlowLayout) messagePanel.getLayout()).setAlignment(FlowLayout.LEADING); messagePanel.removeAll(); messagePanel.revalidate(); }
display.removeAll(); display.add(selectedTab.getContent()); display.revalidate(); display.repaint();
trackerWrapper.add(tracker, BorderLayout.NORTH); for (VarType cb : VarType.values()) trackerOpts.add(cb.getCheckBox()); clearBtn.addActionListener(e -> tracker.removeAll(); tracker.revalidate(); }); trackerOpts.add(clearBtn);
/** * Adds new arrow. * * @param startX * @param startY * @param endX * @param endY * @param color */ public void addArrow(UUID gameId, int startX, int startY, int endX, int endY, Color color, Type type) { JPanel p = getArrowsPanel(gameId); Arrow arrow = new Arrow(); arrow.setColor(color); arrow.setArrowLocation(startX, startY, endX, endY); arrow.setBounds(0, 0, Math.max(startX, endX) + 40, Math.max(startY, endY) + 30); // 30 is offset for arrow heads (being cut otherwise) synchronized (map) { p.add(arrow); Map<Type, java.util.List<Arrow>> innerMap = map.computeIfAbsent(gameId, k -> new HashMap<>()); java.util.List<Arrow> arrows = innerMap.computeIfAbsent(type, k -> new ArrayList<>()); arrows.add(arrow); } p.revalidate(); p.repaint(); }
public void setAtlas (TextureAtlas atlas) { atlasPanel.clearSelection(); atlasPanel.setAtlas(atlas); CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout(); cardLayout.show(content, "atlas"); showGenerationPanel(false); content.revalidate(); content.repaint(); revalidate(); repaint(); }
private void rebuildLapList() lapsContainer.removeAll(); lapsContainer.add(createSmallLabel("" + (c.gridy + 1)), c); lapsContainer.add(createSmallLabel(getFormattedDuration(lap - previousLap)), c); lapsContainer.add(createSmallLabel(getFormattedDuration(lap)), c); lapsContainer.revalidate(); lapsContainer.repaint();
private void settingsSelected() { editorPanel.removeAll(); NodeSettingsEditor editor = new NodeSettingsEditor(dialog); editorPanel.add(editor, BorderLayout.CENTER); editorPanel.revalidate(); selectedPort = null; }
private void addVarLog(VarType type, String name, String old, String neew) { if (!type.getCheckBox().isSelected()) { return; } int tick = client.getTickCount(); SwingUtilities.invokeLater(() -> { if (tick != lastTick) { lastTick = tick; JLabel header = new JLabel("Tick " + tick); header.setFont(FontManager.getRunescapeSmallFont()); header.setBorder(new CompoundBorder( BorderFactory.createMatteBorder(0, 0, 1, 0, ColorScheme.LIGHT_GRAY_COLOR), BorderFactory.createEmptyBorder(3, 6, 0, 0) )); tracker.add(header); } tracker.add(new JLabel(String.format("%s %s changed: %s -> %s", type.getName(), name, old, neew))); // Cull very old stuff for (; tracker.getComponentCount() > MAX_LOG_ENTRIES; ) { tracker.remove(0); } tracker.revalidate(); }); }
JPanel contentPane = (JPanel)displayFrames.get(f).getContentPane(); contentPane.add(new EnterPINPanel(), BorderLayout.CENTER); contentPane.revalidate(); contentPane.repaint();
/** * Rebuilds all the boxes from scratch using existing listed records, depending on the grouping mode. */ private void rebuild() { logsContainer.removeAll(); boxes.clear(); int start = 0; if (!groupLoot && records.size() > MAX_LOOT_BOXES) { start = records.size() - MAX_LOOT_BOXES; } for (int i = start; i < records.size(); i++) { buildBox(records.get(i)); } boxes.forEach(LootTrackerBox::rebuild); updateOverall(); logsContainer.revalidate(); logsContainer.repaint(); }
public void setTexture(Texture texture){ texturePanel.clearSelection(); texturePanel.setTexture(texture); CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout(); cardLayout.show(content, "texture"); showGenerationPanel(true); content.revalidate(); content.repaint(); revalidate(); repaint(); }
public void clearSummaryTab() { summaryHtmlArea.setText(""); summaryTopPanel.removeAll(); summaryTopPanel.revalidate(); }
}); listContainer.removeAll(); listContainer.add(row); listContainer.revalidate(); listContainer.repaint();
private void portSelected(Port port) { editorPanel.removeAll(); PortAttributesEditor editor = new PortAttributesEditor(dialog, port.getName()); editorPanel.add(editor, BorderLayout.CENTER); editorPanel.revalidate(); selectedPort = port; }
JPanel rootPanel = new JPanel(layoutManager); Spacer spacer = new Spacer(); rootPanel.add(spacer, new GridConstraints(configurables.size(), 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); JPanel hideablePanel = new JPanel(new BorderLayout()); rootPanel.add(hideablePanel, configurableConstrains(i)); rootPanel.setPreferredSize(new Dimension(400, 600)); rootPanel.revalidate(); return rootPanel;
protected void addProgressBar() { progressBar = ProgressBar.create(progressComponent); //NOI18N GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH; gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; progressImpl.add(progressBar, gridBagConstraints); progressImpl.repaint(); progressImpl.revalidate(); }
/** * Removes all arrows from the screen. */ public void removeAllArrows(UUID gameId) { if (map.containsKey(gameId)) { Map<Type, List<Arrow>> innerMap = map.get(gameId); JPanel p = getArrowsPanel(gameId); synchronized (map) { if (p != null && p.getComponentCount() > 0) { p.removeAll(); p.revalidate(); p.repaint(); } innerMap.clear(); map.remove(gameId); } } }
public void setTexture(Texture texture){ texturePanel.clearSelection(); texturePanel.setTexture(texture); CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout(); cardLayout.show(content, "texture"); showGenerationPanel(true); content.revalidate(); content.repaint(); revalidate(); repaint(); }