Package java.beans

Examples of java.beans.Expression.execute()


     * @return
     */
    public static Object getAttributeValue(String propName, Object owner){
        try {
            Expression expr = new Expression(owner, "get" + propName, new Object[0]); //$NON-NLS-1$
            expr.execute();
            return expr.getValue();
        } catch (Exception e) {
            return null;
        }
    }
View Full Code Here


     */
    public static boolean isAnchored(Object ref){

            try {
            Expression expr = new Expression(ref, "getIsAnchored", new Object[0]);
                expr.execute();
                boolean value = Boolean.valueOf(expr.getValue().toString()).booleanValue();
                return value;
        } catch (Exception e) {
            return false;
        }
View Full Code Here

      }
      else {
          try {
              Expression expr = new Expression(ref, "setIsAnchored",
                      new Object[] { value });
              expr.execute();
          } catch (Exception e) {
              //Ignore it
          }
      }
    }
View Full Code Here

        }
        int mset, num;
        Expression expr;
        try {
            expr = new Expression(win, "getTitleSetNum", new Object[0]);
            expr.execute();
            mset = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getTitleMsgNum", new Object[0]); //$NON-NLS-1$
            expr.execute();
            num = ((Integer) expr.getValue()).intValue();
View Full Code Here

            expr = new Expression(win, "getTitleSetNum", new Object[0]);
            expr.execute();
            mset = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getTitleMsgNum", new Object[0]); //$NON-NLS-1$
            expr.execute();
            num = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getSetNum", new Object[0]);
            expr.execute();
            defaultSet = ((Integer) expr.getValue()).intValue();
View Full Code Here

            expr = new Expression(win, "getTitleMsgNum", new Object[0]); //$NON-NLS-1$
            expr.execute();
            num = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getSetNum", new Object[0]);
            expr.execute();
            defaultSet = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getForm", new Object[0]); //$NON-NLS-1$
            expr.execute();
            form = ((JPanel) expr.getValue());
View Full Code Here

            expr = new Expression(win, "getSetNum", new Object[0]);
            expr.execute();
            defaultSet = ((Integer) expr.getValue()).intValue();

            expr = new Expression(win, "getForm", new Object[0]); //$NON-NLS-1$
            expr.execute();
            form = ((JPanel) expr.getValue());

            if ((mset < 1) && (defaultSet > 0)) {
                mset = defaultSet;
            }
View Full Code Here

    public static int getDefaultMessageSet(JComponent comp) {
      // TF:Mar 2, 2010:Changed this to use the getSetNum method
        int defaultSet = -1;
        try {
            Expression expr = new Expression(comp.getRootPane().getParent(), "getSetNum", new Object[0]);
            expr.execute();
            defaultSet = ((Integer) expr.getValue()).intValue();
        }
        catch (Exception e) {
        }
        return defaultSet;
View Full Code Here

     * is used as a menu hot key, then the menu hot key will no longer function.
     */
    public static int setAsFunctionKey(JFrame win, int key, boolean isFunction, boolean includeAltKey) {
        try {
            Expression expr = new Expression(win, "getForm", new Object[0]);
            expr.execute();
            JPanel form = ((JPanel) expr.getValue());
            Integer count = (Integer) form.getClientProperty("qq_FNkeyCount");
            if (count == null) {
                count = new Integer(0);
            }
View Full Code Here

     */
    //PM:13/6/08 changed to return type of Panel to unsure it is a compound field
    public static Panel getForm(JFrame win) {
                try {
                Expression expr = new Expression(win, "getForm", new Object[0]);
                    expr.execute();
                    Panel form = ((Panel)expr.getValue());
                    return form;
            } catch (Exception e) {
                return null;
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.