Beispiel #1
0
  public void putHsLayout(int id) {
    Hashtable hs = sshare.userInfo();
    if (hs == null) return;
    String key, name;
    JComponent obj;
    PushpinIF pobj;

    for (int i = 0; i < keys.size(); i++) {
      key = (String) keys.get(i);
      obj = (JComponent) panes.get(key);
      if (obj != null && (obj instanceof PushpinIF)) {
        pobj = (PushpinIF) obj;
        name = "tabTool." + id + "." + pobj.getName() + ".";
        hs.put(name + "refY", new Float(pobj.getRefY()));
        hs.put(name + "refX", new Float(pobj.getRefX()));
        hs.put(name + "refH", new Float(pobj.getRefH()));
        key = "open";
        if (pobj.isHide()) key = "hide";
        else if (pobj.isClose()) key = "close";
        hs.put(name + "status", key);
      }
    }
    /*
    name = "tabTool."+id+".TabPanel.";
    key = pinPanel.getLastName();
    if (key != null)
       hs.put(name+"lastName", key);
    key = "open";
    if (pinPanel.isHide())
       key = "hide";
    else if (pinPanel.isClose())
       key = "close";
    hs.put(name+"status", key);
     */
  }
Beispiel #2
0
  public void getHsLayout(int id) {
    Hashtable hs = sshare.userInfo();
    if (hs == null) return;
    String key, name, status;
    Float fstr;
    float fv;

    for (int j = 0; j < keys.size(); j++) {
      key = (String) keys.get(j);
      JComponent obj = (JComponent) panes.get(key);
      if (obj instanceof PushpinIF) {
        PushpinIF pobj = (PushpinIF) obj;
        name = "tabTool." + id + "." + pobj.getName() + ".";
        fstr = (Float) hs.get(name + "refY");
        if (fstr != null) pobj.setRefY(fstr.floatValue());
        fstr = (Float) hs.get(name + "refX");
        if (fstr != null) pobj.setRefX(fstr.floatValue());
        fstr = (Float) hs.get(name + "refH");
        if (fstr != null) pobj.setRefH(fstr.floatValue());
        status = (String) hs.get(name + "status");
        if (status != null) pobj.setStatus(status);
      }
    }
  }