Esempio n. 1
0
  public boolean load() {
    try {
      if (new File(FILE_PATH).exists()) {
        FileInputStream FIS = new FileInputStream(FILE_PATH);
        JXMLBaseObject cobjXmlObj = new JXMLBaseObject();
        cobjXmlObj.InitXMLStream(FIS);
        FIS.close();

        Vector exps = new Vector();
        Element rootElmt = cobjXmlObj.GetElementByName(JCStoreTableModel.ROOT_NAME);
        for (Iterator i = rootElmt.getChildren().iterator(); i.hasNext(); ) {
          Element crtElmt = (Element) i.next();
          JCExpression exp = new JCExpression();
          exp.mId = crtElmt.getAttributeValue("id", "");
          exp.mName = crtElmt.getAttributeValue("name", "");
          exp.mShowValue = crtElmt.getAttributeValue("show", "");
          exp.mStoreValue = crtElmt.getAttributeValue("store", "");
          exps.add(exp);
        }
        if (mModel != null) {
          mModel.setExpression(exps);
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      return false;
    }
    return true;
  }
Esempio n. 2
0
 /** Key binding for special call */
 public KeyBinding(String plugin, String description, int keyCode, int modifierEx) {
   this.pluginName = plugin;
   this.description = description;
   TypeKeycode kb = new TypeKeycode(keyCode, modifierEx);
   types.add(kb);
 }
Esempio n. 3
0
 /** Key binding for special call */
 public KeyBinding(String plugin, String description, char key) {
   this.pluginName = plugin;
   this.description = description;
   TypeChar kb = new TypeChar(key);
   types.add(kb);
 }
Esempio n. 4
0
 /** Key binding */
 public KeyBinding(String plugin, String description, KeyBindingType kb) {
   this.pluginName = plugin;
   this.description = description;
   if (kb != null) types.add(kb);
 }