本文整理了Java中javax.swing.Box.removeAll()
方法的一些代码示例,展示了Box.removeAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Box.removeAll()
方法的具体详情如下:
包路径:javax.swing.Box
类名称:Box
方法名:removeAll
暂无
代码示例来源:origin: RaiMan/SikuliX2
public void addButton(String name){
if (defaultButton != null){
//Debug.info("removing" + defaultButton);
buttons.remove(defaultButton);
buttons.removeAll();
defaultButton = null;
}
buttons.add(new Button(name));
}
代码示例来源:origin: JetBrains/jediterm
public void removeAll() {
myBox.removeAll();
}
代码示例来源:origin: cmu-phil/tetrad
public void stateChanged(ChangeEvent changeEvent) {
System.out.println("a1 shown");
a1.removeAll();
setUpA1(dataSets, a1);
}
});
代码示例来源:origin: xyz.cofe/docking-frames-ext-toolbar
@Override
public void unbind(){
view.removeAll();
view = null;
for (final CustomizationMenuContent item : content){
item.unbind();
}
}
代码示例来源:origin: protegeproject/protege
public void clearValues() {
removeAll();
radioButtonBox.removeAll();
radioButtons.clear();
}
代码示例来源:origin: net.sf.mmax2/mmax2
public final void removeAllAttributes()
{
Box tempbox = (Box) modifiablePanel.getComponent(0);
tempbox.removeAll();
}
代码示例来源:origin: antlr/antlrworks
public void clearMessage() {
label.setText("");
box.removeAll();
box.add(Box.createHorizontalStrut(20));
visible = false;
currentDisplayedLevel = Console.LEVEL_NORMAL;
}
代码示例来源:origin: cmu-phil/tetrad
/**
* Updates bootstrap table on adding/removing edges or graph changes
*
* @param graph
*/
private void updateBootstrapTable(Graph graph) {
tablePaneBox.removeAll();
JScrollPane tablePane = BootstrapTable.renderBootstrapTable(graph);
tablePaneBox.add(tablePane);
validate();
}
代码示例来源:origin: com.sikulix/sikulixapi
public void addButton(String name){
if (defaultButton != null){
//Debug.info("removing" + defaultButton);
buttons.remove(defaultButton);
buttons.removeAll();
defaultButton = null;
}
buttons.add(new Button(name));
}
代码示例来源:origin: cmu-phil/tetrad
/**
* Updates bootstrap table on adding/removing edges or graph changes
*
* @param graph
*/
private void updateBootstrapTable(Graph graph) {
tablePaneBox.removeAll();
JScrollPane tablePane = BootstrapTable.renderBootstrapTable(graph);
tablePaneBox.add(tablePane);
validate();
}
代码示例来源:origin: cmu-phil/tetrad
/**
* Updates bootstrap table on adding/removing edges or graph changes
*
* @param graph
*/
private void updateBootstrapTable(Graph graph) {
tablePaneBox.removeAll();
JScrollPane tablePane = BootstrapTable.renderBootstrapTable(graph);
tablePaneBox.add(tablePane);
validate();
}
代码示例来源:origin: cmu-phil/tetrad
/**
* Updates bootstrap table on adding/removing edges or graph changes
*
* @param graph
*/
private void updateBootstrapTable(Graph graph) {
tablePaneBox.removeAll();
JScrollPane tablePane = BootstrapTable.renderBootstrapTable(graph);
tablePaneBox.add(tablePane);
validate();
}
代码示例来源:origin: protegeproject/protege
public void setValues(@Nonnull List<LabelledValue> labelledValues) {
removeAll();
radioButtons.clear();
radioButtonBox.removeAll();
if (labelledValues.size() < THRESHOLD_SIZE) {
add(radioButtonBox, BorderLayout.NORTH);
ButtonGroup bg = new ButtonGroup();
labelledValues.forEach(v -> {
JRadioButton b = new JRadioButton(v.getLabel());
bg.add(b);
radioButtons.put(b, v);
radioButtonBox.add(b);
});
}
else {
comboBox.setModel(new DefaultComboBoxModel<>(labelledValues.toArray(new LabelledValue[labelledValues.size()])));
add(comboBox, BorderLayout.NORTH);
}
}
代码示例来源:origin: antlr/antlrworks
private void createPathSelectionButtons() {
pathButtonSelectionBox.removeAll();
if(!(view.getCurrentGraph() instanceof GGraphGroup))
return;
GGraphGroup gg = (GGraphGroup)view.getCurrentGraph();
int count = gg.getPathGroup().getNumberOfPaths();
if(count <= 1)
pathButtonSelectionBox.add(new JLabel("Alternative:"));
else
pathButtonSelectionBox.add(new JLabel("Alternatives:"));
for(int i=0; i<count; i++) {
pathButtonSelectionBox.add(createPathSelectionButton(i));
}
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
@Override
public void aboutToDisplayPanel() {
mainBox.removeAll();
optionsPanels.clear();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
OWLOntologyID id = parameter.getOntologyID();
if (id == null) {
continue;
}
ImportLocationOptionsPanel optionsPanel = new ImportLocationOptionsPanel(parameter);
Border titledBorder = BorderFactory.createTitledBorder("Physical Location: " + parameter.getPhysicalLocation().toString());
optionsPanel.setBorder(titledBorder);
mainBox.add(optionsPanel);
optionsPanels.add(optionsPanel);
}
}
代码示例来源:origin: cmu-phil/tetrad
public void setAlgorithmResult(String jsonResult) {
this.jsonResult = jsonResult;
System.out.println("json result: " + jsonResult);
final Graph graph = JsonUtils.parseJSONObjectToTetradGraph(jsonResult);
final List<Graph> graphs = new ArrayList<>();
graphs.add(graph);
int size = runner.getGraphs().size();
for (int index = 0; index < size; index++) {
runner.getGraphs().remove(index);
}
runner.getGraphs().add(graph);
LOGGER.info("Remote graph result assigned to runner!");
firePropertyChange("modelChanged", null, null);
// Update the graphContainer
graphContainer.removeAll();
graphContainer.add(createSearchResultPane(graph));
changeCard(GRAPH_CARD);
}
代码示例来源:origin: antlr/antlrworks
public void showLevel(int level) {
if(level == Console.LEVEL_NORMAL)
return;
if(!visible) {
visible = true;
box.removeAll();
box.add(label);
box.revalidate();
}
if(level > currentDisplayedLevel) {
currentDisplayedLevel = level;
if(level == Console.LEVEL_ERROR)
showMessage("Errors reported in console", Color.red);
else
showMessage("Warnings reported in console", Color.blue);
}
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
@Override
public void aboutToDisplayPanel() {
mainBox.removeAll();
optionsPanels.clear();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
OWLOntologyID id = parameter.getOntologyID();
if (id == null) {
continue;
}
ImportLocationOptionsPanel optionsPanel = new ImportLocationOptionsPanel(parameter);
Border lineBorder = BorderFactory.createLineBorder(Color.GRAY);
Border titledBorder = BorderFactory.createTitledBorder(lineBorder, "Physical Location: " + parameter.getPhysicalLocation().toString());
optionsPanel.setBorder(titledBorder);
mainBox.add(optionsPanel);
optionsPanels.add(optionsPanel);
}
}
代码示例来源:origin: org.protege/protege-editor-owl
@Override
public void aboutToDisplayPanel() {
mainBox.removeAll();
optionsPanels.clear();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
OWLOntologyID id = parameter.getOntologyID();
if (id == null) {
continue;
}
ImportLocationOptionsPanel optionsPanel = new ImportLocationOptionsPanel(parameter);
Border lineBorder = BorderFactory.createLineBorder(Color.GRAY);
Border titledBorder = BorderFactory.createTitledBorder(lineBorder, "Physical Location: " + parameter.getPhysicalLocation().toString());
optionsPanel.setBorder(titledBorder);
mainBox.add(optionsPanel);
optionsPanels.add(optionsPanel);
}
}
代码示例来源:origin: protegeproject/protege
@Override
public void aboutToDisplayPanel() {
mainBox.removeAll();
optionsPanels.clear();
Set<ImportInfo> parameters = ((OntologyImportWizard) getWizard()).getImports();
for (ImportInfo parameter : parameters) {
OWLOntologyID id = parameter.getOntologyID();
if (id == null) {
continue;
}
ImportLocationOptionsPanel optionsPanel = new ImportLocationOptionsPanel(parameter);
Border titledBorder = BorderFactory.createTitledBorder("Physical Location: " + parameter.getPhysicalLocation().toString());
optionsPanel.setBorder(titledBorder);
mainBox.add(optionsPanel);
optionsPanels.add(optionsPanel);
}
}
内容来源于网络,如有侵权,请联系作者删除!