Package lupos.gui.operatorgraph.visualeditor.util

Examples of lupos.gui.operatorgraph.visualeditor.util.GraphWrapperOperator


public class PredicatePanel extends AbstractGuiComponent<Operator> {
  private static final long serialVersionUID = 5428234388837014129L;

  public PredicatePanel(final VisualGraphOperatorWithPrefix parent, final RDFTerm operator, final RDFTerm child) {
    super(parent, new GraphWrapperOperator(operator), operator, false);

    this.parentOp = operator;
    this.child = child;

    this.setLayout(new GridBagLayout());
View Full Code Here


      PredicatePanel predicatePanel = new PredicatePanel((VisualGraphOperatorWithPrefix) parent, this, child);

      this.annotationLabels.put(child, predicatePanel);

      // add predicate panel to hash table with its GraphWrapper...
      predicates.put(new GraphWrapperOperator(child), predicatePanel);
    }

    return predicates;
  }
View Full Code Here

      for (final Literal l : soSortedLiterals)
        variablesSubj.add(new ComboItem(l));

      QueryRDFTerm queryRDFTerm = new QueryRDFTerm(prefixInstance);
      // just in order to set panel of QueryRDFTerm...
      queryRDFTerm.draw(new GraphWrapperOperator(queryRDFTerm), AdvancedQueryEditor.this.visualGraphs.get(0));
     
      subjectPanel = new SuggestionPanel(PADDING, queryRDFTerm, variablesSubj, rowPanel);

      final int subjectX = PADDING;
      final int subjectY = PADDING;
      final int subjectWidth = subjectPanel.getPreferredSize().width;
      final int subjectHeight = subjectPanel.getPreferredSize().height;

      subjectPanel.setBounds(subjectX, subjectY, subjectWidth,
          subjectHeight);

      rowPanel.add(subjectPanel);
      // --- subject - end ---

      // --- predicate - begin ---
      final LinkedList<ComboItem> variablesPred = new LinkedList<ComboItem>();
      variablesPred.add(new ComboItem(this.varPred));

      final HashSet<Literal> predLiterals = new HashSet<Literal>();

      for (final Bindings b : this.queryResult_preceding)
        predLiterals.add(b.get(this.varPred));

      final LinkedList<Literal> predSortedLiterals = new LinkedList<Literal>();
      predSortedLiterals.addAll(predLiterals);

      Collections.sort(predSortedLiterals);

      for (final Literal l : predSortedLiterals)
        variablesPred.add(new ComboItem(l));

      QueryRDFTerm queryRDFTerm2 = new QueryRDFTerm(prefixInstance);
      // just in order to set panel of QueryRDFTerm...
      queryRDFTerm2.draw(new GraphWrapperOperator(queryRDFTerm2), AdvancedQueryEditor.this.visualGraphs.get(0));
     
      predicatePanelS = new SuggestionPanel(PADDING, queryRDFTerm2, variablesPred, rowPanel);

      final int predicateX = subjectX + subjectWidth + SPACING;
      final int predicateY = PADDING;
      final int predicateWidth = predicatePanelS.getPreferredSize().width;
      final int predicateHeight = predicatePanelS.getPreferredSize().height;

      predicatePanelS.setBounds(predicateX, predicateY, predicateWidth,
          predicateHeight);

      rowPanel.add(predicatePanelS);
      // --- predicate - end ---

      // --- object - begin ---
      final AbstractGuiComponent<Operator> objectPanel = this.op.draw(
          new GraphWrapperOperator(this.op), PADDING, font);
      ((JTextField) objectPanel.getComponent(0)).setEditable(false);
      objectPanel.setMovable(false);

      final int objectX = predicateX + predicateWidth + SPACING;
      final int objectY = PADDING;
View Full Code Here

          this.queryResult_succeeding, this.varSO, this.varPred);
      rowPanel.setLayout(null);

      // --- subject - begin ---
      final AbstractGuiComponent<Operator> subjectPanel = this.op.draw(
          new GraphWrapperOperator(this.op), PADDING, font);
      ((JTextField) subjectPanel.getComponent(0)).setEditable(false);
      subjectPanel.setMovable(false);

      final int subjectX = PADDING;
      final int subjectY = PADDING;
View Full Code Here

    final Hashtable<GraphWrapper, AbstractSuperGuiComponent> lineLables = new Hashtable<GraphWrapper, AbstractSuperGuiComponent>();

    for(final OperatorIDTuple<Operator> opIDt : this.succeedingOperators) {
      final String text = (opIDt.getId() == 0) ? "left" : "right";

      final GraphWrapper gw = new GraphWrapperOperator(opIDt.getOperator());

      final AbstractGuiComponent<Operator> element = new OptionalPanel(this, gw, parent, text, opIDt.getOperator());

      this.annotationLabels.put(opIDt.getOperator(), element);
View Full Code Here

        opIDt.setId(1);
      else if(opIDt.getId() == 1)
        opIDt.setId(0);
    }

    final GraphBox box = parent.getBoxes().get(new GraphWrapperOperator(this));
    box.setLineAnnotations(this.drawAnnotations(parent));

    parent.arrange(Arrange.values()[0]);
  }
View Full Code Here

    rowPanel.add(predicatePanelS);
    // --- predicate - end ---

    // --- object - begin ---
    final AbstractGuiComponent<Operator> objectPanel = this.op.draw(
        new GraphWrapperOperator(this.op), this.queryGraph);
    ((JTextField) objectPanel.getComponent(0)).setEditable(false);
    objectPanel.setMovable(false);

    final int objectX = predicateX + predicateWidth
        + (int) this.queryGraph.getSPACING_X();
View Full Code Here

        this.queryResult_succeeding, this.varSO, this.varPred);
    rowPanel.setLayout(null);

    // --- subject - begin ---
    final AbstractGuiComponent<Operator> subjectPanel = this.op.draw(
        new GraphWrapperOperator(this.op), this.queryGraph);
    ((JTextField) subjectPanel.getComponent(0)).setEditable(false);
    subjectPanel.setMovable(false);

    final int subjectX = (int) this.queryGraph.PADDING;
    final int subjectY = (int) this.queryGraph.PADDING;
View Full Code Here

  private final JComboBox jCoBo;

  public SuggestionPanel(final VisualGraph<Operator> parent,
      final Operator op, final LinkedList<ComboItem> elements,
      final SuggestionRowPanel rowPanel) {
    super(parent, new GraphWrapperOperator(op), op, false);

    this.elements = elements;

    for (final MouseListener ml : this.getMouseListeners())
      this.removeMouseListener(ml);
View Full Code Here

  }

  public SuggestionPanel(final int PADDING, final Operator op,
      final LinkedList<ComboItem> elements,
      final SuggestionRowPanel rowPanel) {
    super(null, new GraphWrapperOperator(op), op, false);

    this.elements = elements;

    for (final MouseListener ml : this.getMouseListeners())
      this.removeMouseListener(ml);
View Full Code Here

TOP

Related Classes of lupos.gui.operatorgraph.visualeditor.util.GraphWrapperOperator

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.