Package javax.swing

Examples of javax.swing.DefaultListModel.clear()


    }
   
    /** Remove all messages from the dialogue */
    void clearMessages() {
        DefaultListModel messageModel = (DefaultListModel)messageList.getModel();
        messageModel.clear();
    }
   
    /**
     * Adds all the messages contained in logger to the dialog
     * @param logger CompilerMessageLogger containing messages to add
View Full Code Here


    /**
     * Updates the list of modules in the minimal workspace.
     */
    private void updateModulesInMinimalWorkspaceList() {
        DefaultListModel model = (DefaultListModel)modulesInMinimalWorkspaceList.getModel();
        model.clear();
       
        CALWorkspace.DependencyFinder depFinder = getDependencyFinder();
       
        List <Pair<ModuleName, Boolean>> items = new ArrayList<Pair<ModuleName, Boolean>>();
       
View Full Code Here

                // If the connection or table has been changed since the fields were fetched, rebuild the list.
                if (!connectionForFields.equals(connectionGemName)
                        || !tableForFields.equals(tableName)) {
                    sourceModel.clear();
                    destModel.clear();
                }

                // Populate the source fields list, if necessary.
                if (sourceModel.isEmpty()) {
View Full Code Here

                        availableFieldsList.setSelectedIndex(0);
                    }
                }

                // Update the controls with the current values.
                destModel.clear();
                for (final FieldInfo fieldInfo : selectedFields) {
                    destModel.addElement(fieldInfo);
                }

                // Select the first item in the selected fields list, if any.
View Full Code Here

                // If the connection or table has been changed since the fields were fetched, rebuild the list.
                if (!connectionForFields.equals(connectionGemName)
                        || !tableForFields.equals(tableName)) {
                    sourceModel.clear();
                    destModel.clear();
                }

                // Populate the source fields list, if necessary.
                if (sourceModel.isEmpty()) {
View Full Code Here

                        availableFieldsList.setSelectedIndex(0);
                    }
                }

                // Update the controls with the current values.
                destModel.clear();
                for (final SortField sortField : sortFields) {
                    destModel.addElement(sortField);
                }

                // Select the first item in the sort fields list, if any.
View Full Code Here

    }
   
    /** Clears the error list. */
    private void clearErrorStatus() {
        DefaultListModel listModel = (DefaultListModel) errorsList.getModel();
        listModel.clear();
    }
    
    /**
     * If the given status object contains errors, display them in the error list and return true.
     * @param status The Status object to check for errors
View Full Code Here

      {
        attributes.add(attr.getNameOrOID());
      }
    }
    DefaultListModel model = (DefaultListModel)usedByAttributes.getModel();
    model.clear();
    for (String attr : attributes)
    {
      model.addElement(attr);
    }
  }
View Full Code Here

        requiredByOcs.add(oc.getNameOrOID());
      }
    }

    DefaultListModel model = (DefaultListModel)requiredBy.getModel();
    model.clear();
    for (String oc : requiredByOcs)
    {
      model.addElement(oc);
    }
View Full Code Here

        optionalByOcs.add(oc.getNameOrOID());
      }
    }

    model = (DefaultListModel)optionalBy.getModel();
    model.clear();
    for (String oc : optionalByOcs)
    {
      model.addElement(oc);
    }
    attribute = attr;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.