Package org.w3c.jigadmin

Examples of org.w3c.jigadmin.PropertyManager


     * @param cell The resource cell
     * @see org.w3c.jigadmin.editors.ResourceCell
     */
    protected boolean dropResource(ResourceCell cell) {
  RemoteResourceWrapper rrw = getSelectedResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  try {
      if (! pm.isExtensible(rrw)) {
    return false;
      } else if ((cell.isFrame() || cell.isFilter()) &&
           (pm.isEditable(rrw))) {
    //popupresource
    popupResource(rrw);
    return true;
      } else if (((cell.isContainer() || cell.isResource()) &&
      (! rrw.getResource().isIndexersCatalog()))
View Full Code Here


     * Add a (new) resource to the container associated to the
     * selected node.
     */
    protected void addResourceToSelectedContainer() {
  RemoteResourceWrapper selected = getSelectedResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  try {
      if (selected == null) {
    JOptionPane.showMessageDialog(this,
                "No Container selected",
                "Error",
                JOptionPane.ERROR_MESSAGE);
    return;
      } else if (! pm.isExtensible(selected)) {
    JOptionPane.showMessageDialog(this,
                "The resource selected is not "+
                "extensible.",
                "Error",
                JOptionPane.ERROR_MESSAGE);
View Full Code Here

     * Delete the resources associated to the selected nodes.
     * Display an error message if there is no node selected or if
     * the resource is not editable.
     */
    protected void deleteSelectedResources() {
  PropertyManager pm = PropertyManager.getPropertyManager();
  TreePath path[] = removeDescendants(getSelectionPaths());
  if (path == null) {
      JOptionPane.showMessageDialog(this,
            "No Resource selected",
            "Error",
            JOptionPane.ERROR_MESSAGE);
      return;
  }
  if (path.length > 0) {
      int result =
    JOptionPane.showConfirmDialog(this,
                "Delete selected resource(s)?",
                "Delete Resource(s)",
                JOptionPane.YES_NO_OPTION);
      if (result == JOptionPane.YES_OPTION) {
    DefaultTreeModel model = (DefaultTreeModel) getModel();
    for (int i = 0 ; i < path.length ; i++) {
        RemoteResourceWrapper rrw =
      getSelectedResourceWrapper(path[i]);
        if (rrw == null)
      continue;
        try {
      if (pm.isEditable(rrw)) {
          deleteResource(rrw);
          MutableTreeNode node = (MutableTreeNode)
        path[i].getLastPathComponent();
          model.removeNodeFromParent(node);
      } else {
View Full Code Here

  if (path == null)
      return;
  RemoteResourceWrapperNode node =
      (RemoteResourceWrapperNode) path.getLastPathComponent();
  RemoteResourceWrapper rrw = node.getResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  if (pm.isEditable(rrw))
      popupResource(node.getResourceWrapper());
  else {
      try {
    String name = (String)
        rrw.getResource().getValue("identifier");
View Full Code Here

  boolean container  = false;
  boolean editable   = false;

  try {
      PropertyManager pm = PropertyManager.getPropertyManager();
      container = rrw.getResource().isContainer();
      editable = pm.isEditable(rrw);
  } catch (RemoteAccessException ex) {
      container = false;
  }

  JMenuItem menuItem = null;
View Full Code Here

     * @exception RemoteAccessException is some remote error occurs
     */
    protected Hashtable getResources(RemoteResourceWrapper rrw)
  throws RemoteAccessException
    {
  PropertyManager pm = PropertyManager.getPropertyManager();
  return pm.getFrames();
    }
View Full Code Here

  gbc.weightx = 0;
  gbc.weighty = 0;
  gbc.insets = Utilities.insets4;
  for(int i = 0 ; i < a.length ; i++) {
      if(a[i] != null) {
    PropertyManager pm = PropertyManager.getPropertyManager();
    Properties attrProps =
        pm.getAttributeProperties(rrw, a[i].getAttribute());
    String labelText = (String) attrProps.get("label");
    if ( labelText == null )
        labelText = a[i].getName();
    l = new JLabel(labelText, JLabel.RIGHT);
    ae[i] = AttributeEditorFactory.getEditor(rrw,
View Full Code Here

     * Resets the user object of the receiver to object.
     * @param object the new user object, actually the new identifier.
     */   
    public void setUserObject(Object object) {
  if (object instanceof String) {
      PropertyManager pm = PropertyManager.getPropertyManager();
      if (pm.isEditable(rrw)) {
    try {
        rrw.getResource().setValue("identifier", (String)object);
        name = (String)object;
    } catch (RemoteAccessException ex) {
        Message.showErrorMessage(rrw, ex);
View Full Code Here

  JPanel p1 = (JPanel)helpers.get(name);
  p1.removeAll();
  try {
      RemoteResourceWrapper rrw = root.getChildResource(name);
      AttributesHelper helper = new AttributesHelper();
      PropertyManager pm = PropertyManager.getPropertyManager();
      Properties props = pm.getEditorProperties(rrw);
      helper.initialize(rrw, props);
      p1.add(helper.getComponent());
      p1.invalidate();
      p1.validate();
  } catch (RemoteAccessException ex) {
View Full Code Here

     * Get the Internal Frame containing frame & resource lists
     * @return A JInternalFrame instance
     */
    protected JInternalFrame getInternalFrame() {
  JInternalFrame fr = super.getInternalFrame();
  PropertyManager pm = PropertyManager.getPropertyManager();
  Hashtable indexers = pm.getIndexers();
  Enumeration e =
      (Sorter.sortStringEnumeration(indexers.keys())).elements();
  Vector cells = new Vector(10);
  while (e.hasMoreElements()) {
      String name = (String)e.nextElement();
View Full Code Here

TOP

Related Classes of org.w3c.jigadmin.PropertyManager

Copyright © 2018 www.massapicom. 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.