本文整理了Java中javax.swing.JScrollPane.repaint()
方法的一些代码示例,展示了JScrollPane.repaint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.repaint()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:repaint
暂无
代码示例来源:origin: stanfordnlp/CoreNLP
/**
* 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;
}
代码示例来源:origin: stanfordnlp/CoreNLP
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();
}
}
代码示例来源:origin: magefree/mage
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
代码示例来源:origin: magefree/mage
layoutGrid();
cardScroll.revalidate();
cardScroll.repaint();
} else {
代码示例来源:origin: magefree/mage
@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();
}
}
代码示例来源:origin: magefree/mage
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();
}
代码示例来源:origin: khuxtable/seaglass
public void focusLost(FocusEvent e) {
viewportViewHasFocus = false;
scrollpane.repaint();
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public void addProcessedElement(JSObject aRow) {
processedRows.add(aRow);
progressIndicator.setVisible(true);
gridScroll.repaint();
}
代码示例来源:origin: Audiveris/audiveris
/**
* Clear the current content of the log
*/
public void clearLog ()
{
logArea.setText("");
logArea.setCaretPosition(0);
component.repaint();
}
代码示例来源:origin: net.sf.taverna.t2.ui-components/workflow-explorer
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();
}
};
代码示例来源:origin: net.sf.taverna.t2.ui-components/workflow-explorer
public void run() {
setSelectedNodes(wfTree, workflow);
scrollPane.revalidate();
scrollPane.repaint();
}
};
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = ADD_JSDOC, params = {"component"})
public void add(JComponent aComp) {
if (aComp != null) {
super.setViewportView(aComp);
super.revalidate();
super.repaint();
}
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
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));
}
代码示例来源:origin: protegeproject/protege
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));
}
代码示例来源:origin: biojava/biojava
@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();
}
代码示例来源:origin: raydac/netbeans-mmd-plugin
@Override
public void actionPerformed(@Nonnull final ActionEvent e) {
pageFormat = printerJob.pageDialog(pageFormat);
splitToPagesForCurrentFormat();
scrollPane.revalidate();
scrollPane.getViewport().revalidate();
scrollPane.repaint();
}
});
代码示例来源:origin: raydac/netbeans-mmd-plugin
@Override
public void dragOver(@Nonnull final DropTargetDragEvent dtde) {
if (acceptOrRejectDragging(dtde)) {
dtde.acceptDrag(DnDConstants.ACTION_MOVE);
} else {
dtde.rejectDrag();
}
this.scrollPane.repaint();
}
代码示例来源:origin: org.cytoscape/table-import-impl
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();
}
代码示例来源:origin: raydac/netbeans-mmd-plugin
@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();
}
}
});
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Redo the layout.
*/
public void relayout ()
{
mMainPanel.invalidate ();
mMainScroller.invalidate ();
mMainScroller.validate ();
mMainScroller.repaint ();
}
内容来源于网络,如有侵权,请联系作者删除!