本文整理了Java中javax.swing.JScrollPane.revalidate()
方法的一些代码示例,展示了JScrollPane.revalidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.revalidate()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:revalidate
暂无
代码示例来源:origin: apache/geode
@Override
public void componentResized(ComponentEvent e) {
Component source = e.getComponent();
scroller.setSize(source.getSize());
scroller.revalidate();
}
});
代码示例来源:origin: magefree/mage
/**
* Selection drag handling
*/
private void beginSelectionDrag(int x, int y, boolean shiftHeld) {
// Show the selection panel
selectionPanel.setVisible(true);
selectionPanel.setLocation(x, y);
cardScroll.revalidate();
// Store the drag start location
selectionDragStartX = x;
selectionDragStartY = y;
// Store the starting cards to include in the selection
selectionDragStartCards = new HashSet<>();
if (shiftHeld) {
selectionDragStartCards.addAll(dragCardList());
}
// Notify selection
notifyCardsSelected();
}
代码示例来源:origin: magefree/mage
cardScroll.revalidate();
cardScroll.repaint();
} else {
代码示例来源:origin: magefree/mage
cardScroll.revalidate();
repaint();
JOptionPane.showMessageDialog(null, "Added " + pimpedCards.size() + " cards. You can select them and the originals by choosing 'Multiples'");
代码示例来源: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: magefree/mage
cardScroll.revalidate();
repaint();
代码示例来源:origin: stackoverflow.com
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane scrollPane = (JScrollPane)table.getParent().getParent();
scrollPane.revalidate();
代码示例来源:origin: magefree/mage
cardScroll.revalidate();
repaint();
代码示例来源:origin: antlr/intellij-plugin-v4
public void setScale(double scale) {
if ( treeViewers==null ) return;
for (TreeViewer viewer : treeViewers) {
viewer.setScale(scale);
}
treeScrollPane.revalidate();
}
代码示例来源: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: net.sf.taverna.t2.ui-components/workflow-explorer
public void run() {
// Repaint the scroll pane containing the tree
scrollPane.setViewportView(wfTree);
scrollPane.revalidate();
scrollPane.repaint();
}
};
代码示例来源:origin: com.quinsoft.zeidon/object-browser
void repositionScroll( Point p )
{
// Make sure we aren't scrolling off the screen
Dimension s = getSize();
Dimension ps = drawingPane.getPreferredSize();
p.x = Math.min( ps.width - s.width, p.x );
p.y = Math.min( ps.height - s.height, p.y );
p.x = Math.max( 0, p.x );
p.y = Math.max( 0, p.y );
scroller.getViewport().setViewPosition( p );
scroller.revalidate();
}
代码示例来源: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: io.snappydata/gemfire-hydra-tests
@Override
public void componentResized(ComponentEvent e) {
Component source =e.getComponent();
scroller.setSize(source.getSize());
scroller.revalidate();
}
});
代码示例来源:origin: raydac/netbeans-mmd-plugin
@Override
public void actionPerformed(@Nonnull ActionEvent e) {
options.setDrawAsImage(checkBoxDrawAsImage.isSelected());
splitToPagesForCurrentFormat();
scrollPane.revalidate();
scrollPane.getViewport().revalidate();
scrollPane.repaint();
}
});
代码示例来源: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: org.gephi/ui-components
private void initialize(JFreeChart chart) {
initComponents();
if (chart == null) {
throw new IllegalArgumentException("Chart panel can't be null");
}
this.chartPanel = new ChartPanel(chart, true);
scroll.setViewportView(chartPanel);
adaptChartPanelSizeToScrollSize();
scroll.revalidate();
scroll.repaint();
setVisible(true);
}
代码示例来源:origin: org.biojava.thirdparty/forester
void adjustJScrollPane() {
if ( getTabbedPane() != null ) {
getCurrentScrollPanePanel().remove( getCurrentScrollPane() );
getCurrentScrollPanePanel().add( getCurrentScrollPane(), BorderLayout.CENTER );
}
getCurrentScrollPane().revalidate();
}
内容来源于网络,如有侵权,请联系作者删除!