Tabnine Logo
LayoutAction
Code IndexAdd Tabnine to your IDE (free)

How to use
LayoutAction
in
ca.uvic.cs.chisel.cajun.actions

Best Java code snippets using ca.uvic.cs.chisel.cajun.actions.LayoutAction (Showing top 9 results out of 315)

origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public LayoutAction getLayout(String name) {
  for (LayoutAction layout : layouts) {
    if (layout.getName().equals(name)) {
      return layout;
    }
  }
  return null;
}
origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void addLayoutListener(ProgressListener listener) {
  for(LayoutAction layout : layouts) {
    layout.addProgressListener(listener);
  }
}
origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void performLayout(LayoutAction layout) {
  if (layout != null) {
    layout.runLayout();
  }
}
origin: edu.stanford.protege/org.protege.ontograf

private void initialize(Container parentContainer) {
  // setup the layouts
  List<Object> layoutRelTypes = new ArrayList<Object>();
  layoutRelTypes.add(ProtegeGraphModel.DIRECT_SUBCLASS_SLOT_TYPE);
  layoutRelTypes.add(ProtegeGraphModel.DIRECT_INDIVIDUAL_SLOT_TYPE);
  for (LayoutAction layoutAction : graph.getLayouts()) {
    if (layoutAction.getName().equals(LayoutConstants.LAYOUT_TREE_HORIZONTAL)) {
      layoutAction.setLayout(new HorizontalDirectedGraphLayoutAlgorithm());
      this.graph.setLastLayout(layoutAction);
      layoutAction.setLayoutRelTypes(layoutRelTypes);
    } else if (layoutAction.getName().equals(LayoutConstants.LAYOUT_TREE_VERTICAL)) {
      layoutAction.setLayout(new DirectedGraphLayoutAlgorithm());
      layoutAction.setLayoutRelTypes(layoutRelTypes);
    }
  }
  view = new DefaultFlatGraphView(graph);
  parentContainer.add(view, BorderLayout.CENTER);
  initNodeMenu(graph.getNodeContextMenu());
  graph.addInputEventListener(new ProtegeInputEventHandler(model, graph));
}

origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

LayoutAlgorithm layout = getLayoutAlgorithm();
layout.applyLayout(entities, rels, x, y, w, h, false, false);
  if(!node.isFixedLocation()) {
    if (animate) {
      AffineTransform transform = createTransform(node);
      PActivity activity = createActivity(node, transform);
      if (activity != null) {
        activities.add(activity);
origin: edu.stanford.protege/org.protege.ontograf

if (layoutAction.getName().equals(LayoutConstants.LAYOUT_SPRING)) {
  layoutAction.setLayout(new HorizontalDirectedGraphLayoutAlgorithm());
  this.graph.setLastLayout(layoutAction);
origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

protected void addDefaultLayouts() {
  int style = LayoutStyles.NO_LAYOUT_NODE_RESIZING;
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_GRID_BY_ALPHA, ResourceHandler.getIcon("icon_grid_layout.gif"), new GridLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_RADIAL, ResourceHandler.getIcon("icon_radial_layout.gif"), new RadialLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_SPRING, ResourceHandler.getIcon("icon_spring_layout.gif"), new SpringLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_TREE_VERTICAL, ResourceHandler.getIcon("icon_tree_layout.gif"), new TreeLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_TREE_HORIZONTAL, ResourceHandler.getIcon("icon_tree_layout_horizontal.gif"), new HorizontalTreeLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_DIRECTED_VERTICAL, ResourceHandler.getIcon("icon_tree_layout.gif"), new DirectedGraphLayoutAlgorithm(style), this));
  addLayout(new LayoutAction(LayoutConstants.LAYOUT_DIRECTED_HORIZONTAL, ResourceHandler.getIcon("icon_tree_layout_horizontal.gif"), new HorizontalDirectedGraphLayoutAlgorithm(style), this));
  
  // important - set the last layout
  this.lastLayout = getLayout(LayoutConstants.LAYOUT_DIRECTED_VERTICAL);
}
origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void doAction() {
  // save this action as the last executed action
  ((AbstractGraph) graph).setLastLayout(this);
  runLayout();
}

origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun

public void performLayout() {
  if (getLastLayout() != null) {
    filterManager.applyFilters(model);
    getLastLayout().runLayout();
  }
}
ca.uvic.cs.chisel.cajun.actionsLayoutAction

Most used methods

  • getName
  • <init>
  • addProgressListener
  • createActivity
    See ca.uvic.csr.shrimp.DisplayBean.AbstractDisplayBean# setTransformsOfNodesWithAnimation(java.util.
  • createTransform
  • getLayoutAlgorithm
    Creates a new instance of the LayoutAlgorithm using reflection.
  • runLayout
  • setLayout
  • setLayoutRelTypes

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Kernel (java.awt.image)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now