Package org.w3c.jigadmin

Examples of org.w3c.jigadmin.PropertyManager


    public static
  ServerEditorInterface getServerEditor(String name,
                ServerBrowser browser,
                RemoteResourceWrapper server)
    {
  PropertyManager pm = PropertyManager.getPropertyManager();
  String editorClass = pm.getEditorClass(server);

  if (editorClass == null)
      return null;

  ServerEditorInterface editor =
      (ServerEditorInterface)editors.get(name+browser);

  if (editor == null) {
      try {
    Class  c = Class.forName(editorClass);
    Object o = c.newInstance();
    if (o instanceof ServerEditorInterface) {
        editor = (ServerEditorInterface) o;
        editor.initialize(name,
              server,
              pm.getEditorProperties(server));
    } else {
        throw new RuntimeException(editorClass+" doesn't "+
             "implements ServerEditorInterface.");
    }
      } catch (Exception ex) {
View Full Code Here


      TitledBorder border =
    BorderFactory.createTitledBorder("User: "+user);
      border.setTitleFont(Utilities.mediumBoldFont);
      userPanel.setBorder(border);
      AttributesHelper helper = new AttributesHelper();
      PropertyManager pm = PropertyManager.getPropertyManager();
      Properties props = pm.getEditorProperties(userrrw);
      helper.initialize(userrrw, props);

      JButton delUserB = new JButton("Delete user "+user);
      delUserB.setMargin(Utilities.insets0);
      delUserB.setActionCommand(DEL_USER_AC);
View Full Code Here

     */
    public static
  ServerHelperInterface getServerHelper(String name,
                RemoteResourceWrapper rrw)
    {
  PropertyManager pm = PropertyManager.getPropertyManager();

  Properties props = pm.getEditorProperties(rrw);
  String editorClass = (String) props.get(SERVER_HELPER_P);

  if (editorClass == null)
      return null;

View Full Code Here

    public static synchronized
    AttributeEditor getEditor(RemoteResourceWrapper rrw, Attribute attribute) {
  RemoteResource resource = rrw.getResource();

  PropertyManager pm = PropertyManager.getPropertyManager();
  Properties props = pm.getAttributeProperties(rrw, attribute);
  String className = (String) props.get("class");
  if ( className == null ) {
      System.out.println("can't edit "+attribute.getName()+" !");
      return null;
  }
View Full Code Here

    /**
     * Get the Internal Frame containing frame & resource lists
     * @return A JInternalFrame instance
     */   
    protected JInternalFrame getInternalFrame() {
  PropertyManager pm = PropertyManager.getPropertyManager();
  JInternalFrame frame = new JInternalFrame("Available Resources",
              true, //resizable
              false, //closable
              true, //maximizable
              true);//iconifiable
  tabbedPane = new JTabbedPane();
  //Resource list
  Hashtable resources = pm.getResources();
  Enumeration e =
      (Sorter.sortStringEnumeration(resources.keys())).elements();
  Vector cells = new Vector(10);
  while (e.hasMoreElements()) {
      String name = (String)e.nextElement();
      ResourceCell cell =
    new ResourceCell(name, (String)resources.get(name));
      cells.addElement(cell);
  }
  DraggableList list = getResourceList(cells);
  JScrollPane scroll = new JScrollPane(list);
  tabbedPane.addTab("Resources", null, scroll, "Resources available");
  //frames
  resources = pm.getFrames();
  e = (Sorter.sortStringEnumeration(resources.keys())).elements();
  cells = new Vector(10);
  while (e.hasMoreElements()) {
      String name = (String)e.nextElement();
      ResourceCell cell =
View Full Code Here

     * @exception RemoteAccessException is some remote error occurs
     */
    protected Hashtable getResources(RemoteResourceWrapper rrw)
  throws RemoteAccessException
    {
  PropertyManager pm = PropertyManager.getPropertyManager();
  RemoteResource rr = rrw.getResource();
  if (rr.isIndexersCatalog())
      return pm.getIndexers();
  else
      return pm.getResources();
    }
View Full Code Here

  selected_rrw = rrw;
  attrs.invalidate();
  attrs.removeAll();
  AttributesHelper helper = new AttributesHelper();
  try {
      PropertyManager pm = PropertyManager.getPropertyManager();
      Properties props = pm.getEditorProperties(rrw);
      helper.initialize(rrw, props);
      attrs.add(helper.getComponent());
  } catch (RemoteAccessException ex) {
      ex.printStackTrace();
  }
View Full Code Here

    /**
     * Add a frame to the selected container.
     */
    protected void addResourceToSelectedContainer() {
  RemoteResourceWrapper selected = getSelectedResourceWrapper();
  PropertyManager pm = PropertyManager.getPropertyManager();
  if (selected == null) {
      JOptionPane.showMessageDialog(this,
            "No resource 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

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.