/** * Remove all trees from the display */ public void clearMatches() { JPanel spaceholder = new JPanel(); spaceholder.setBackground(Color.white); scroller.setViewportView(spaceholder); scroller.validate(); scroller.repaint(); matchedPartCoordinates = null; matchedPartCoordinateIdx = -1; }
public void setFontSizeRepaint(int fontSize) { this.fontSize = fontSize; if (tjp != null) { tjp.setFontSize(fontSize); // cdm 2009: it seems like you need to call revalidate and repaint on precisely these components or it doesn't work ... tricky stuff. tjp.revalidate(); scroller.repaint(); } }
private void btClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btClearActionPerformed // TODO add your handling code here: this.tList.uncheckAll(); //this.tList.repaint(); scrollList.repaint(); }//GEN-LAST:event_btClearActionPerformed
layoutGrid(); cardScroll.revalidate(); cardScroll.repaint(); } else {
@Override public void dragCardEnd(DragCardTarget target) { if (target == this) { // Already handled by dragged onto handler } else if (target == null) { // Don't remove the cards, no target } else { // Remove dragged cards for (ArrayList<ArrayList<CardView>> gridRow : cardGrid) { for (ArrayList<CardView> stack : gridRow) { for (int i = 0; i < stack.size(); ++i) { CardView card = stack.get(i); if (card.isSelected()) { stack.set(i, null); removeCardView(card); eventSource.fireEvent(card, ClientEventType.REMOVE_SPECIFIC_CARD); } } } } trimGrid(); layoutGrid(); cardScroll.revalidate(); cardScroll.repaint(); } }
public void sortLayout() { if (battlefield == null || this.getWidth() < 1) { // Can't do layout when panel is not sized yet return; } layoutStrategy.doLayout(this, width); this.jScrollPane.repaint(); this.jScrollPane.revalidate(); invalidate(); repaint(); }
public void focusLost(FocusEvent e) { viewportViewHasFocus = false; scrollpane.repaint(); } }
@Override public void addProcessedElement(JSObject aRow) { processedRows.add(aRow); progressIndicator.setVisible(true); gridScroll.repaint(); }
/** * Clear the current content of the log */ public void clearLog () { logArea.setText(""); logArea.setCaretPosition(0); component.repaint(); }
public void run() { // Select the node(s) that should be selected (do this after assigning the tree to the scroll pane) setSelectedNodes(wfTree, workflow); // Set the tree for the current workflow wfTree = openedWorkflowsTrees.get(workflow); // Repaint the scroll pane containing the tree scrollPane.setViewportView(wfTree); // Repaint the scroll pane containing the tree scrollPane.revalidate(); scrollPane.repaint(); } };
public void run() { setSelectedNodes(wfTree, workflow); scrollPane.revalidate(); scrollPane.repaint(); } };
@ScriptFunction(jsDoc = ADD_JSDOC, params = {"component"}) public void add(JComponent aComp) { if (aComp != null) { super.setViewportView(aComp); super.revalidate(); super.repaint(); } }
private void handleScrollpaneViewportChanged() { Rectangle tableVisibleRect = resultsTable.getVisibleRect(); TableColumn categoryColumn = resultsTable.getColumnModel().getColumn(0); int columnWidth = categoryColumn.getWidth(); int rowHeight = resultsTable.getRowHeight() * 2; scrollPane.repaint(new Rectangle(tableVisibleRect.x, tableVisibleRect.y, columnWidth, rowHeight)); }
private void handleScrollpaneViewportChanged() { Rectangle tableVisibleRect = resultsTable.getVisibleRect(); TableColumn categoryColumn = resultsTable.getColumnModel().getColumn(0); int columnWidth = categoryColumn.getWidth(); int rowHeight = resultsTable.getRowHeight() * 2; scrollPane.repaint(new Rectangle(tableVisibleRect.x, tableVisibleRect.y, columnWidth, rowHeight)); }
@Override public void stateChanged(ChangeEvent e) { JSlider source = (JSlider)e.getSource(); if ( source.getValueIsAdjusting()) { //return; } //System.out.println("Changed scale to "+source.getValue()); mPanel.setScale((float)source.getValue()/SLIDER_STEPS); scroll.repaint(); scroll.updateUI(); }
@Override public void actionPerformed(@Nonnull final ActionEvent e) { pageFormat = printerJob.pageDialog(pageFormat); splitToPagesForCurrentFormat(); scrollPane.revalidate(); scrollPane.getViewport().revalidate(); scrollPane.repaint(); } });
@Override public void dragOver(@Nonnull final DropTargetDragEvent dtde) { if (acceptOrRejectDragging(dtde)) { dtde.acceptDrag(DnDConstants.ACTION_MOVE); } else { dtde.rejectDrag(); } this.scrollPane.repaint(); }
private void updateAliasTableCell(String name, int columnIndex) { JTable curTable = aliasTableMap.get(previewPanel.getSelectedSheetName()); curTable.setDefaultRenderer(Object.class, new AliasTableRenderer(attributeDataTypes, primaryKeyComboBox.getSelectedIndex())); AliasTableModel curModel = aliasTableModelMap.get(previewPanel.getSelectedSheetName()); curModel.setValueAt(name, columnIndex, 1); curTable.setModel(curModel); curTable.repaint(); aliasScrollPane.repaint(); repaint(); }
@Override public void actionPerformed(@Nonnull final ActionEvent e) { final MMDPrintOptionsPanel panel = new MMDPrintOptionsPanel(options); if (dialogProvider.msgOkCancel(theInstance, BUNDLE.getString("MMDPrintOptionsPanel.Title"), panel)) { options = panel.getOptions(); splitToPagesForCurrentFormat(); scrollPane.revalidate(); scrollPane.getViewport().revalidate(); scrollPane.repaint(); } } });
/** * Redo the layout. */ public void relayout () { mMainPanel.invalidate (); mMainScroller.invalidate (); mMainScroller.validate (); mMainScroller.repaint (); }