本文整理了Java中javax.swing.JComponent.removeAll()
方法的一些代码示例,展示了JComponent.removeAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComponent.removeAll()
方法的具体详情如下:
包路径:javax.swing.JComponent
类名称:JComponent
方法名:removeAll
暂无
代码示例来源:origin: apache/pdfbox
public void changeData(byte[] bytes)
{
if (mainPane.getComponentCount() > 0)
{
mainPane.removeAll();
}
HexModel model = new HexModel(bytes);
mainPane.add(new HexEditor(model));
mainPane.validate();
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
public void setLeftConnector(Connector c) {
leftContainer.removeAll();
leftContainer.add(c);
}
代码示例来源:origin: eu.mihosoft.vrl/vrl
public void setRightConnector(Connector c) {
rightContainer.removeAll();
rightContainer.add(c);
}
代码示例来源:origin: mikaelhg/openblocks
public void setElements(Collection<? extends JComponent> items) {
this.elements = items;
view.removeAll();
for (JComponent element : items) {
view.add(element);
}
reformItems();
}
代码示例来源:origin: mikaelhg/openblocks
/**
* @effects resets BlockCanvas by removing all pages, dividers, and blocks.
*/
public void reset() {
pages.clear();
canvas.removeAll();
dividers.clear();
scrollPane.revalidate();
}
代码示例来源:origin: org.metawidget.modules.swing/metawidget-swing
@Override
public void removeAll() {
super.removeAll();
if ( !mIgnoreAddRemove ) {
invalidateWidgets();
mFacets.clear();
mExistingComponents.clear();
}
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
@Override
public void removeAll() {
super.removeAll();
if ( !mIgnoreAddRemove ) {
invalidateWidgets();
mFacets.clear();
mExistingComponents.clear();
}
}
代码示例来源:origin: org.fudaa.framework.ebli/ebli-2d
/**
* Enleve tous les composants.
*/
public void reinitialise() {
cqAffPanels_ = new Hashtable();
pnLegendes_.removeAll();
removeAll();
}
代码示例来源:origin: org.metawidget.modules.swing/metawidget-swing
/**
* Invalidates the widgets.
*/
protected void invalidateWidgets() {
if ( mNeedToBuildWidgets ) {
return;
}
// Note: it is important to call removeAll BEFORE setting mNeedToBuildWidgets
// to true. On some JRE implementations (ie. 1.6_12) removeAll triggers an
// immediate repaint which sets mNeedToBuildWidgets back to false
super.removeAll();
// Prepare to build widgets
mNeedToBuildWidgets = true;
// Call repaint here, rather than just 'invalidate', for scenarios like doing
// a 'remove' of a button that masks a Metawidget
repaint();
}
代码示例来源:origin: edu.toronto.cs.medsavant/mfiume-component-transition
private void addPanelAndFill(JComponent child, JComponent parent) {
parent.removeAll();
parent.setLayout(new BorderLayout());
parent.add(child,BorderLayout.CENTER);
parent.updateUI();
}
代码示例来源:origin: com.dorkbox/SystemTray
@Override
public
void run() {
_native.setVisible(false);
_native.removeAll();
if (parent != null) {
parent._native.remove(_native);
}
else {
// have to dispose of the tray popup hidden frame, otherwise the app will never close (because this will hold it open)
((TrayPopup) _native).close();
}
}
});
代码示例来源:origin: protegeproject/protege
private void fillImportList() {
importedOntologiesComponent.removeAll();
Box box = new Box(BoxLayout.Y_AXIS);
boolean advanced = ((OntologyImportWizard) getWizard()).isCustomizeImports();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
if (parameter.isReady()) {
if (advanced) {
ImportEntryPanel importPanel = new ImportEntryPanel(parameter);
box.add(importPanel);
}
else {
box.add(new JLabel(parameter.getPhysicalLocation().toString()));
}
}
}
importedOntologiesComponent.add(box, BorderLayout.NORTH);
}
代码示例来源:origin: org.protege/protege-editor-owl
private void fillImportList() {
importedOntologiesComponent.removeAll();
Box box = new Box(BoxLayout.Y_AXIS);
boolean advanced = ((OntologyImportWizard) getWizard()).isCustomizeImports();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
if (parameter.isReady()) {
if (advanced) {
ImportEntryPanel importPanel = new ImportEntryPanel(parameter);
box.add(importPanel);
}
else {
box.add(new JLabel(parameter.getPhysicalLocation().toString()));
}
}
}
importedOntologiesComponent.add(box, BorderLayout.NORTH);
}
代码示例来源:origin: org.fudaa.framework.ebli/ebli-common
public void setTable(final BuTable _table) {
table_= _table;
if (utiliseFormules_) {
fu_= new EbliUtilisateurTableauModele(table_.getModel());
if (!(table_.getModel() instanceof EbliUtilisateurTableauModele)) {
table_.setModel(fu_);
}
}
content_.removeAll();
content_.add(new JScrollPane(table_), BuBorderLayout.CENTER);
final Dimension d= table_.getPreferredSize();
d.width= Math.min(d.width, 470) + 30;
d.height= Math.min(d.height, 220) + 30;
setPreferredSize(d);
pack();
}
public void actionPerformed(final ActionEvent _evt) {
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
private void fillImportList() {
importedOntologiesComponent.removeAll();
Box box = new Box(BoxLayout.Y_AXIS);
boolean advanced = ((OntologyImportWizard) getWizard()).isCustomizeImports();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
if (parameter.isReady()) {
if (advanced) {
ImportEntryPanel importPanel = new ImportEntryPanel(parameter);
box.add(importPanel);
}
else {
box.add(new JLabel(parameter.getPhysicalLocation().toString()));
}
}
}
importedOntologiesComponent.add(box, BorderLayout.NORTH);
}
代码示例来源:origin: org.appdapter/org.appdapter.lib.gui
@Override
public void reloadContents00() {
final Collection collection = getCollection();
panel.removeAll();
for (Object value : copyOf(collection)) {
addRow(value);
}
reloaded();
}
代码示例来源:origin: xyz.cofe/docking-frames-core
public void run(){
resetStarted = false;
getContentPane().removeAll();
for( int i = 0, n = station.getDockableCount(); i<n; i++ ){
DockTitle title = station.getButton( i );
if( title != null ){
getContentPane().add( title.getComponent() );
}
}
span.reset();
revalidate();
}
};
代码示例来源:origin: violetumleditor/violetumleditor
@Override
public void installUI(JComponent c)
{
c.removeAll();
this.colorToolsPanel.setBackground(ThemeManager.getInstance().getTheme().getSidebarElementBackgroundColor());
this.colorToolsPanel.add(getPanel());
}
代码示例来源:origin: violetumleditor/violetumleditor
@Override
public void installUI(JComponent c)
{
c.removeAll();
this.optionalToolsPanel.setBackground(ThemeManager.getInstance().getTheme().getSidebarElementBackgroundColor());
JButton bHelp = this.optionalToolsPanel.getHelpButton();
// addButton(bHelp);
JButton bPrint = this.optionalToolsPanel.getPrintButton();
addButton(bPrint);
JButton bExportToClipboard = this.optionalToolsPanel.getExportToClipboardButton();
addButton(bExportToClipboard);
this.optionalToolsPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));
this.optionalToolsPanel.add(getPanel());
}
代码示例来源:origin: violetumleditor/violetumleditor
@Override
public void installUI(JComponent c)
{
c.removeAll();
c.setBackground(ThemeManager.getInstance().getTheme().getSidebarElementBackgroundColor());
this.editorToolsPanel.getZoomInButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getZoomOutButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getDeleteButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getUndoButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getRedoButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getCutButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getCopyButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
this.editorToolsPanel.getPasteButton().setUI(new IconButtonUI(FULLSIZE_SCALING_FACTOR));
c.setLayout(new FlowLayout(FlowLayout.CENTER));
c.add(getToolsPanel());
}
内容来源于网络,如有侵权,请联系作者删除!