本文整理了Java中javax.swing.JPanel.invalidate()
方法的一些代码示例,展示了JPanel.invalidate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.invalidate()
方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:invalidate
暂无
代码示例来源:origin: dboissier/mongo4idea
private void displayResult(JComponent tableView) {
resultTreePanel.invalidate();
resultTreePanel.removeAll();
resultTreePanel.add(new JBScrollPane(tableView));
resultTreePanel.validate();
}
代码示例来源:origin: dboissier/mongo4idea
void initCombo(final ComboBox combobox, final JPanel parentPanel) {
combobox.setModel(new DefaultComboBoxModel<>(JsonDataType.values()));
combobox.setRenderer(new ColoredListCellRenderer() {
@Override
protected void customizeCellRenderer(JList jList, Object o, int i, boolean b, boolean b2) {
append(((JsonDataType) o).type);
}
});
combobox.setSelectedItem(null);
combobox.addItemListener(itemEvent -> {
JsonDataType selectedType = (JsonDataType) combobox.getSelectedItem();
currentEditor = UI_COMPONENT_BY_JSON_DATATYPE.get(selectedType);
currentEditor.reset();
parentPanel.invalidate();
parentPanel.removeAll();
parentPanel.add(currentEditor.getComponent(), BorderLayout.CENTER);
parentPanel.validate();
});
combobox.setSelectedItem(JsonDataType.STRING);
}
代码示例来源:origin: dboissier/mongo4idea
@Override
public void run(@NotNull ProgressIndicator indicator) {
try {
UIUtil.invokeLaterIfNeeded(() -> loadingDecorator.startLoading(false));
final MongoQueryOptions queryOptions = wayPoint.getQueryOptions();
if (!useCachedResults) {
currentResults = mongoManager.findMongoDocuments(
configuration,
wayPoint.getCollection(),
queryOptions);
}
UIUtil.invokeLaterIfNeeded(() -> {
resultPanel.updateResultView(currentResults, pagination);
rowCountLabel.setText(String.format("%s documents", currentResults.getDocuments().size()));
initActions(resultPanel.resultTreeTableView);
});
} catch (final Exception ex) {
UIUtil.invokeLaterIfNeeded(() -> {
errorPanel.invalidate();
errorPanel.removeAll();
errorPanel.add(new ErrorPanel(ex), BorderLayout.CENTER);
errorPanel.validate();
errorPanel.setVisible(true);
});
} finally {
UIUtil.invokeLaterIfNeeded(loadingDecorator::stopLoading);
}
}
});
代码示例来源:origin: org.freehep/freehep-graphics2d
/**
* Triggers a full repaint, since the component is not valid anymore (size
* change, iconized, ...)
*/
public void invalidate() {
super.invalidate();
repaint = true;
}
代码示例来源:origin: org.activecomponents.jadex/jadex-applications-bdi
public void actionPerformed(ActionEvent e)
{
map.invalidate();
map.repaint();
}
});
代码示例来源:origin: LibraryOfCongress/bagger
public void updateAddData() {
saveBagAsExecutor.setEnabled(true);
bagButtonPanel.invalidate();
topButtonPanel.invalidate();
}
代码示例来源:origin: igvteam/igv
public void addCommandBar(JComponent component) {
component.setBorder(new BasicBorders.MenuBarBorder(Color.GRAY, Color.GRAY));
component.setAlignmentX(Component.BOTTOM_ALIGNMENT);
commandBarPanel.add(component);
commandBarPanel.invalidate();
}
代码示例来源:origin: net.lecousin/core
/** End of initial startup. */
public synchronized void endInit() {
if (win == null) return;
progressText.setText("Starting framework...");
progressBar.setMinimum(0);
progressBar.setMaximum(10050);
progressBar.setValue(50);
bottom.invalidate();
}
代码示例来源:origin: undera/jmeter-plugins
private void refreshGraphPreview() {
parent.getGraphPanelChart().invalidateCache();
jPanelGraphPreview.invalidate();
jPanelGraphPreview.repaint();
}
代码示例来源:origin: undera/jmeter-plugins
public void refreshPreview() {
parent.getGraphObject().invalidateCache();
jPanelGraphPreview.invalidate();
jPanelGraphPreview.repaint();
}
代码示例来源:origin: kg.apc/jmeter-plugins-cmn-jmeter
private void refreshGraphPreview() {
parent.getGraphPanelChart().invalidateCache();
jPanelGraphPreview.invalidate();
jPanelGraphPreview.repaint();
}
代码示例来源:origin: com.jidesoft/jide-oss
@Override
public void invalidate() {
if ((getInvokeCondition() & INVOKE_ON_VALIDATE) != 0) {
initialize();
}
super.invalidate();
}
代码示例来源:origin: dsukhoroslov/bagri
@Override
public void invalidate() {
super.invalidate();
if (!optionsGrid.isLoaded()) {
optionsGrid.reload();
}
}
代码示例来源:origin: dsukhoroslov/bagri
@Override
public void invalidate() {
super.invalidate();
if (!grid.isLoaded()) {
grid.reload();
}
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-mobility-svgcore
private void initializeReportView() {
JPanel basePanel = m_svgView.getBasePanel();
if ( basePanel.getComponentCount() > 0) {
if ( basePanel.getComponent(0) == m_panel) {
return;
} else {
basePanel.removeAll();
}
}
basePanel.add( m_panel, BorderLayout.CENTER);
basePanel.invalidate();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-ruby-railsprojects
private void outputToggleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_outputToggleActionPerformed
if (outputToggle.isSelected()) {
detailsPanel.add(detailsScrollPane, java.awt.BorderLayout.CENTER);
} else {
detailsPanel.remove(detailsScrollPane);
}
detailsPanel.invalidate();
invalidate();
revalidate();
validate();
repaint();
}//GEN-LAST:event_outputToggleActionPerformed
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-apisupport-wizards
@Override
public void run() {
progress.setVisible(false);
outlineView.setVisible(true);
progress.invalidate();
outlineView.invalidate();
validate();
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Redo the layout.
*/
public void relayout ()
{
mMainPanel.invalidate ();
mMainScroller.invalidate ();
mMainScroller.validate ();
mMainScroller.repaint ();
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
private void revalidateDetailsPanel() {
detailsPanel.invalidate();
repaint();
if (detailsPanel.getParent() != null) {
detailsPanel.getParent().validate();
} else {
detailsPanel.validate();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
private void revalidateDetailsPanel() {
detailsPanel.invalidate();
repaint();
if (detailsPanel.getParent() != null) {
detailsPanel.getParent().validate();
} else {
detailsPanel.validate();
}
}
内容来源于网络,如有侵权,请联系作者删除!