Refine search
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
display.add(selectedTab.getContent()); display.revalidate(); display.repaint();
public void updateVoices(LanguageComponentDescription newLanguage, boolean forceUpdate) { if (currentLanguage != null && currentLanguage.equals(newLanguage) && !forceUpdate) { return; } currentLanguage = newLanguage; List<VoiceComponentDescription> lVoices = getVoicesForLanguage(currentLanguage); pVoices.removeAll(); for (ComponentDescription desc : lVoices) { pVoices.add(new ShortDescriptionPanel(desc, null)); } pVoices.add(Box.createVerticalGlue()); pVoices.repaint(); this.pack(); }
lapsContainer.add(createSmallLabel("" + (c.gridy + 1)), c); lapsContainer.add(createSmallLabel(getFormattedDuration(lap - previousLap)), c); lapsContainer.add(createSmallLabel(getFormattedDuration(lap)), c); lapsContainer.revalidate(); lapsContainer.repaint();
public void updateVoices(LanguageComponentDescription newLanguage, boolean forceUpdate) { if (currentLanguage != null && currentLanguage.equals(newLanguage) && !forceUpdate) { return; } currentLanguage = newLanguage; List<VoiceComponentDescription> lVoices = getVoicesForLanguage(currentLanguage); pVoices.removeAll(); for (ComponentDescription desc : lVoices) { pVoices.add(new ShortDescriptionPanel(desc, null)); } pVoices.add(Box.createVerticalGlue()); pVoices.repaint(); this.pack(); }
/** * 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(); }
listContainer.add(row); listContainer.revalidate(); listContainer.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(); }
JPanel contentPane = (JPanel) frame.getContentPane(); contentPane.removeAll(); contentPane.add(panel); contentPane.revalidate(); contentPane.repaint();
public void addShiftAssignment(ShiftAssignment shiftAssignment) { Shift shift = shiftAssignment.getShift(); JPanel shiftPanel = shiftPanelMap.get(shift); JButton shiftAssignmentButton = SwingUtils.makeSmallButton(new JButton(new ShiftAssignmentAction(shiftAssignment))); shiftAssignmentButton.setEnabled(shiftPanel.isEnabled()); if (employee != null) { if (employee.getDayOffRequestMap().containsKey(shift.getShiftDate()) || employee.getShiftOffRequestMap().containsKey(shift)) { shiftAssignmentButton.setForeground(TangoColorFactory.SCARLET_1); } } Color color = nurseRosteringPanel.determinePlanningEntityColor(shiftAssignment, shift.getShiftType()); shiftAssignmentButton.setBackground(color); String toolTip = nurseRosteringPanel.determinePlanningEntityTooltip(shiftAssignment); shiftAssignmentButton.setToolTipText(toolTip); shiftPanel.add(shiftAssignmentButton); shiftPanel.repaint(); shiftAssignmentButtonMap.put(shiftAssignment, shiftAssignmentButton); }
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(); }
/** * 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(); }
currentPanel.add(tab, JLayeredPane.DEFAULT_LAYER + count++, 0); y += dy; if (set.equals(currentSet)) { jPanelLeft.revalidate(); jPanelLeft.repaint(); jPanelRight.revalidate(); jPanelRight.repaint(); if (currentTab != null) { currentTab.drawSet();
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(); }
JPanel contentPane = (JPanel)displayFrames.get(f).getContentPane(); contentPane.add(new EnterPINPanel(), BorderLayout.CENTER); contentPane.revalidate(); contentPane.repaint();
boolean previousSelected = renderGridCheckBox != null && renderGridCheckBox.isSelected(); renderGridCheckBox = new JCheckBox("Render Grid", previousSelected); gridPanel.add(renderGridCheckBox, new GridBagConstraints()); addEditorRow(gridPanel); for (Component component : rowsPanel.getComponents()) if (component instanceof EditorPanel) ((EditorPanel)component).update(ParticleEditor.this); rowsPanel.repaint();