Package lupos.gui.operatorgraph

Examples of lupos.gui.operatorgraph.DrawObject


        return;
      }
      if(!BooleanDatatype.getValues(className + "_useStyledBoxes").get(0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1, size.height - 1, Color.WHITE, Color.BLACK);
      } else {
        DrawObject drawObject = null;
        if(this.element instanceof PrefixOperator) {
          drawObject = this.getOperatorStyle("documentEditorPane_style_prefixoperator");
        }
        if(this.element instanceof ImportOperator) {
          drawObject = this.getOperatorStyle("documentEditorPane_style_importoperator");
        } else if(this.element instanceof RuleOperator) {
          drawObject = this.getOperatorStyle("documentEditorPane_style_ruleoperator");
        } else if(this.element instanceof AnnotationOperator) {
          drawObject = this.getOperatorStyle("documentEditorPane_style_annotationoperator");
        } else if(this.element instanceof GroupOperator) {
          drawObject = this.getOperatorStyle("documentEditorPane_style_groupoperator");
        } else if(this.element instanceof VariableOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_variableoperator");
        } else if(this.element instanceof ConstantOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_constantoperator");
        } else if(this.element instanceof UnitermOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_unitermoperator");
        } else if(this.element instanceof ListOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_listoperator");
        } else if(this.element instanceof FrameOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_frameoperator");
        }

        if(drawObject == null) {
          drawObject = this.getOperatorStyle(className + "_style_operator");
        }

        if(drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width, size.height, Color.WHITE, Color.BLACK);
        }
      }
    } catch(final Exception e) {
View Full Code Here


      if(!BooleanDatatype.getValues(className + "_useStyledBoxes").get(0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1, size.height - 1, Color.WHITE, Color.BLACK);
      }
      else {
        DrawObject drawObject = null;

        if(this.element instanceof VariableOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_variableoperator");
        }

        if(this.element instanceof ConstantOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_constantoperator");
        }

        if(this.element instanceof UnitermOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_unitermoperator");
        }

        if(this.element instanceof ListOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_listoperator");
        }

        if(this.element instanceof FrameOperator) {
          drawObject = this.getOperatorStyle("ruleEditorPane_style_frameoperator");
        }

        if(drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width, size.height, Color.WHITE, Color.BLACK);
        }
      }
    } catch(final Exception e) {
View Full Code Here

      if (!BooleanDatatype.getValues("operatorGraph_useStyledBoxes").get(
          0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1,
            size.height - 1, Color.WHITE, Color.BLACK);
      } else {
        final DrawObject drawObject = this
        .getOperatorStyle("operatorGraph_style_prefix");

        if (drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawGradientPaintRoundBox(g2d, 0, 0, size.width,
              size.height, Color.LIGHT_GRAY, Color.GRAY);
        }
      }
View Full Code Here

      if(!BooleanDatatype.getValues(className + "_useStyledBoxes").get(0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1, size.height - 1, Color.WHITE, Color.BLACK);
      }
      else {
        DrawObject drawObject = null;

        if(this.element instanceof OperatorContainer) {
          drawObject = new DrawObject(Type.SIMPLEBOX, InnerAttribute.GRADIENTPAINT, OuterAttribute.NONE, Color.WHITE, Color.WHITE);
        } else {
          drawObject = this.getOperatorStyle(((Operator)this.element).getXPrefID());
        }

        if(drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        }
        else {
          DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width, size.height, Color.WHITE, Color.BLACK);
        }
      }
View Full Code Here

          DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1, size.height - 1, Color.WHITE, Color.BLACK);
          already = true;
        }
      }
      if(!already){
        DrawObject drawObject = null;

        drawObject = this.getOperatorStyle(((Operator) this.element).getXPrefIDForAnnotation());

        if(drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        }
        else {
          DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width, size.height, Color.WHITE, Color.BLACK);
        }
      }
View Full Code Here

      if (!BooleanDatatype.getValues("ast_useStyledBoxes").get(0)
          .booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1,
            size.height - 1, Color.WHITE, Color.BLACK);
      } else {
        DrawObject drawObject = null;

        if (instanceOf(this.element, Arrays.asList(NodeToken.class))) {
          drawObject = this
              .getOperatorStyle("ast_style_terminalnode");
        } else
          drawObject = this
              .getOperatorStyle("ast_style_nonterminalnode");

        if (drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawGradientPaintRoundBox(g2d, 0, 0, size.width,
              size.height, Color.LIGHT_GRAY, Color.WHITE);
        }
      }
View Full Code Here

    try {
      if(!BooleanDatatype.getValues("ast_useStyledBoxes").get(0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1, size.height - 1, Color.WHITE, Color.BLACK);
      }
      else {
        DrawObject drawObject = null;

        if(instanceOf(this.element, Arrays.asList(Constant.class, RuleVariable.class))) {
          drawObject = this.getOperatorStyle("ast_style_terminalnode");
        }
        else {
          drawObject = this.getOperatorStyle("ast_style_nonterminalnode");
        }

        if(drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        }
        else {
          DrawObject.drawGradientPaintRoundBox(g2d, 0, 0, size.width, size.height, Color.LIGHT_GRAY, Color.WHITE);
        }
      }
View Full Code Here

      if (!BooleanDatatype.getValues("operatorGraph_useStyledBoxes").get(
          0).booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1,
            size.height - 1, Color.WHITE, Color.BLACK);
      } else {
        final DrawObject drawObject = this
        .getOperatorStyle("operatorGraph_style_prefix");

        if (drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawGradientPaintRoundBox(g2d, 0, 0, size.width,
              size.height, Color.LIGHT_GRAY, Color.GRAY);
        }
      }
View Full Code Here

      if(!GraphWrapper.styles.containsKey(styleName)) {
        final Type shapeType = Helper.castEnum(EnumDatatype.getValues(styleName + ".shape").get(0));
        final Color color1 = ColorDatatype.getValues(styleName + ".color1").get(0);
        final Color color2 = ColorDatatype.getValues(styleName + ".color2").get(0);

        GraphWrapper.styles.put(styleName, new DrawObject(shapeType, InnerAttribute.GRADIENTPAINT, OuterAttribute.NONE, color1, color2));
      }
    }
    catch(final Exception e) {
      System.err.println(e);
      e.printStackTrace();
View Full Code Here

      if (!BooleanDatatype.getValues("ast_useStyledBoxes").get(0)
          .booleanValue()) {
        DrawObject.drawSimpleBoxOuterLines(g2d, 0, 0, size.width - 1,
            size.height - 1, Color.WHITE, Color.BLACK);
      } else {
        DrawObject drawObject = null;

        if (isQueryHead(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_queryheadnode");
        } else if (isOperatorNode(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_operatornode");
        } else if (this.element instanceof ASTTripleSet) {
          drawObject = this
              .getOperatorStyle("ast_style_triplepatternnode");
        } else if (isFunctionNode(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_functionnode");
        } else if (isHighLevelOperator(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_highleveloperatornode");
        } else if (isTerminalNode(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_terminalnode");
        } else if (isNonTerminalNode(this.element.getClass())) {
          drawObject = this
              .getOperatorStyle("ast_style_nonterminalnode");
        }

        if (drawObject != null) {
          drawObject.draw(g2d, 0, 0, size.width, size.height);
        } else {
          DrawObject.drawGradientPaintRoundBox(g2d, 0, 0, size.width,
              size.height, Color.LIGHT_GRAY, Color.WHITE);
        }
      }
View Full Code Here

TOP

Related Classes of lupos.gui.operatorgraph.DrawObject

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.