⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkparser.java

📁 Skin Look And Feel 1.2.10, 给你的java程序换肤, 支持大量通用皮肤文件.
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        value = jj_consume_token(BOOLEAN);
                          image.setProperty(property.image, value.image);
        break;
      case OVERLAY_FILE:
        property = jj_consume_token(OVERLAY_FILE);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, readString());
        break;
      case OVERLAY_BORDER:
        property = jj_consume_token(OVERLAY_BORDER);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, borderDefinition());
        break;
      case OVERLAY_STRETCH:
        property = jj_consume_token(OVERLAY_STRETCH);
        jj_consume_token(ASSIGN);
        value = jj_consume_token(BOOLEAN);
                          image.setProperty(property.image, value.image);
        break;
      case SHADOW:
        property = jj_consume_token(SHADOW);
        jj_consume_token(ASSIGN);
        value = jj_consume_token(SHADOW_TYPE);
                          image.setProperty(property.image, value.image);
        break;
      case GAP_START_FILE:
        property = jj_consume_token(GAP_START_FILE);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, readString());
        break;
      case GAP_START_BORDER:
        property = jj_consume_token(GAP_START_BORDER);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, borderDefinition());
        break;
      case GAP_END_FILE:
        property = jj_consume_token(GAP_END_FILE);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, readString());
        break;
      case GAP_END_BORDER:
        property = jj_consume_token(GAP_END_BORDER);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, borderDefinition());
        break;
      case GAP_SIDE:
        property = jj_consume_token(GAP_SIDE);
        jj_consume_token(ASSIGN);
        value = jj_consume_token(DIRECTION);
                          image.setProperty(property.image, value.image);
        break;
      case GAP_FILE:
        property = jj_consume_token(GAP_FILE);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, readString());
        break;
      case GAP_BORDER:
        property = jj_consume_token(GAP_BORDER);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, borderDefinition());
        break;
      case ORIENTATION:
        property = jj_consume_token(ORIENTATION);
        jj_consume_token(ASSIGN);
        value = jj_consume_token(ORIENTATION_TYPE);
                          image.setProperty(property.image, value.image);
        break;
      case ARROW_DIRECTION:
        property = jj_consume_token(ARROW_DIRECTION);
        jj_consume_token(ASSIGN);
        value = jj_consume_token(DIRECTION);
                          image.setProperty(property.image, value.image);
        break;
      case PROPERTY_KEY:
        property = jj_consume_token(PROPERTY_KEY);
        jj_consume_token(ASSIGN);
                          image.setProperty(property.image, readString());
        break;
      default:
        jj_la1[7] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case FUNCTION:
      case RECOLORABLE:
      case FILE:
      case BORDER:
      case STRETCH:
      case SHADOW:
      case STATE:
      case DETAIL:
      case GAP_SIDE:
      case GAP_FILE:
      case GAP_BORDER:
      case GAP_START_FILE:
      case GAP_START_BORDER:
      case GAP_END_FILE:
      case GAP_END_BORDER:
      case OVERLAY_FILE:
      case OVERLAY_BORDER:
      case OVERLAY_STRETCH:
      case ORIENTATION:
      case ARROW_DIRECTION:
      case PROPERTY_KEY:
        ;
        break;
      default:
        jj_la1[8] = jj_gen;
        break label_5;
      }
    }
    jj_consume_token(RBRACK);
          engine.addImage(image);
  }

  final public GtkBorder borderDefinition() throws ParseException {
        GtkBorder border = new GtkBorder();
        Token tok = null;
    jj_consume_token(LBRACK);
    tok = jj_consume_token(DECIMAL_LITERAL);
                                         border.left = Integer.parseInt(tok.image);
    jj_consume_token(COMMA);
    tok = jj_consume_token(DECIMAL_LITERAL);
                                        border.right = Integer.parseInt(tok.image);
    jj_consume_token(COMMA);
    tok = jj_consume_token(DECIMAL_LITERAL);
                                        border.top = Integer.parseInt(tok.image);
    jj_consume_token(COMMA);
    tok = jj_consume_token(DECIMAL_LITERAL);
                                        border.bottom = Integer.parseInt(tok.image);
    jj_consume_token(RBRACK);
        {if (true) return border;}
    throw new Error("Missing return statement in function");
  }

  final public void classDefinition() throws ParseException {
        GtkClass clas;
    jj_consume_token(CLASS);
                  String name = readString();
                clas = (GtkClass)classTable.get(name);
                if (clas == null) {
                        clas = new GtkClass();
                        clas.setName(name);
                        classTable.put(clas.name, clas);
                }
    jj_consume_token(STYLE);
                clas.addStyleName(readString());
  }

  final public String readString() throws ParseException {
        String value = null;
        Token  toks  = null;
    toks = jj_consume_token(STRING_LITERAL);
                value = new String();
                for (int i=1; i < toks.image.length()-1; i++) {
                if (toks.image.charAt(i) == '\\') {
                        if ((toks.image.charAt(i+1) == '\\') || (toks.image.charAt(i+1) == '"')) {
                                i++;
                        }
                }
                value = value + toks.image.charAt(i);
                }
        {if (true) return(value);}
    throw new Error("Missing return statement in function");
  }

  final public float readFloat() throws ParseException {
        Token toks = null;
    toks = jj_consume_token(DECIMAL_LITERAL);
                {if (true) return Float.valueOf(token.image).floatValue();}
    throw new Error("Missing return statement in function");
  }

  public GtkParserTokenManager token_source;
  ASCII_UCodeESC_CharStream jj_input_stream;
  public Token token, jj_nt;
  private int jj_ntk;
  private int jj_gen;
  final private int[] jj_la1 = new int[9];
  final private int[] jj_la1_0 = {0xc0000,0xc0000,0x20000,0x10000,0x4000,0x200000,0x100000,0xffc00000,0xffc00000,};
  final private int[] jj_la1_1 = {0xe00000,0xe00000,0x0,0x0,0x20000,0x0,0x0,0x10003ff,0x10003ff,};

  public GtkParser(java.io.InputStream stream) {
    jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1);
    token_source = new GtkParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.InputStream stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  public GtkParser(java.io.Reader stream) {
    jj_input_stream = new ASCII_UCodeESC_CharStream(stream, 1, 1);
    token_source = new GtkParserTokenManager(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  public void ReInit(java.io.Reader stream) {
    jj_input_stream.ReInit(stream, 1, 1);
    token_source.ReInit(jj_input_stream);
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  public GtkParser(GtkParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  public void ReInit(GtkParserTokenManager tm) {
    token_source = tm;
    token = new Token();
    jj_ntk = -1;
    jj_gen = 0;
    for (int i = 0; i < 9; i++) jj_la1[i] = -1;
  }

  final private Token jj_consume_token(int kind) throws ParseException {
    Token oldToken;
    if ((oldToken = token).next != null) token = token.next;
    else token = token.next = token_source.getNextToken();
    jj_ntk = -1;
    if (token.kind == kind) {
      jj_gen++;
      return token;
    }
    token = oldToken;
    jj_kind = kind;
    throw generateParseException();
  }

  final public Token getNextToken() {
    if (token.next != null) token = token.next;
    else token = token.next = token_source.getNextToken();
    jj_ntk = -1;
    jj_gen++;
    return token;
  }

  final public Token getToken(int index) {
    Token t = token;
    for (int i = 0; i < index; i++) {
      if (t.next != null) t = t.next;
      else t = t.next = token_source.getNextToken();
    }
    return t;
  }

  final private int jj_ntk() {
    if ((jj_nt=token.next) == null)
      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
    else
      return (jj_ntk = jj_nt.kind);
  }

  private java.util.Vector jj_expentries = new java.util.Vector();
  private int[] jj_expentry;
  private int jj_kind = -1;

  final public ParseException generateParseException() {
    jj_expentries.removeAllElements();
    boolean[] la1tokens = new boolean[57];
    for (int i = 0; i < 57; i++) {
      la1tokens[i] = false;
    }
    if (jj_kind >= 0) {
      la1tokens[jj_kind] = true;
      jj_kind = -1;
    }
    for (int i = 0; i < 9; i++) {
      if (jj_la1[i] == jj_gen) {
        for (int j = 0; j < 32; j++) {
          if ((jj_la1_0[i] & (1<<j)) != 0) {
            la1tokens[j] = true;
          }
          if ((jj_la1_1[i] & (1<<j)) != 0) {
            la1tokens[32+j] = true;
          }
        }
      }
    }
    for (int i = 0; i < 57; i++) {
      if (la1tokens[i]) {
        jj_expentry = new int[1];
        jj_expentry[0] = i;
        jj_expentries.addElement(jj_expentry);
      }
    }
    int[][] exptokseq = new int[jj_expentries.size()][];
    for (int i = 0; i < jj_expentries.size(); i++) {
      exptokseq[i] = (int[])jj_expentries.elementAt(i);
    }
    return new ParseException(token, exptokseq, tokenImage);
  }

  final public void enable_tracing() {
  }

  final public void disable_tracing() {
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -