Codota Logo
RandomLocationTransformer
Code IndexAdd Codota to your IDE (free)

How to use
RandomLocationTransformer
in
edu.uci.ics.jung.layout.util

Best Java code snippets using edu.uci.ics.jung.layout.util.RandomLocationTransformer (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: jrtom/jung

 @Override
 public Point apply(N node) {
  if (this.origin == NE) {
   return applyNE(node);
  } else {
   return applyCenter(node);
  }
 }
}
origin: jrtom/jung

public void initialize() {
 layoutModel.setInitializer(
   new RandomLocationTransformer<N>(layoutModel.getWidth(), layoutModel.getHeight()));
 maxEpoch = 2000;
 epoch = 1;
 radiusConstantTime = 100;
 radius = 5;
 minRadius = 1;
 initialAdaption = 90.0D / 100.0D;
 adaption = initialAdaption;
 minAdaption = 0;
 //factor = 0; //Will be set later on
 coolingFactor = 2;
 //temperature = 0.03;
 //initialJumpRadius = 100;
 //jumpRadius = initialJumpRadius;
 //delay = 100;
}
origin: jrtom/jung

  new RandomLocationTransformer<N>(
    layoutModel.getWidth(), layoutModel.getHeight(), graph.nodes().size()));
if (graph != null && layoutModel != null) {
origin: jrtom/jung

    g,
    layoutAlgorithm,
    new RandomLocationTransformer(600, 600, System.currentTimeMillis()),
    layoutPreferredSize);
VisualizationViewer vv = new VisualizationViewer(model, viewPreferredSize);
origin: jrtom/jung

    g,
    layoutAlgorithm,
    new RandomLocationTransformer(600, 600, System.currentTimeMillis()),
    layoutPreferredSize);
VisualizationViewer vv = new VisualizationViewer(model, viewPreferredSize);
origin: jrtom/jung

.setSize(layoutSize.width, layoutSize.height)
.setInitializer(
  new RandomLocationTransformer<N>(
    layoutSize.width, layoutSize.height, System.currentTimeMillis()))
.build();
origin: jrtom/jung

public SimpleGraphSpatialTest() {
 setLayout(new BorderLayout());
 Network g = TestGraphs.getOneComponentGraph();
 Dimension viewPreferredSize = new Dimension(600, 600);
 Dimension layoutPreferredSize = new Dimension(600, 600);
 LayoutAlgorithm layoutAlgorithm = new FRLayoutAlgorithm();
 ScalingControl scaler = new CrossoverScalingControl();
 VisualizationModel model =
   new BaseVisualizationModel(
     g,
     layoutAlgorithm,
     new RandomLocationTransformer(600, 600, System.currentTimeMillis()),
     layoutPreferredSize);
 VisualizationViewer vv = new VisualizationViewer(model, viewPreferredSize);
 final DefaultModalGraphMouse graphMouse = new DefaultModalGraphMouse();
 vv.setGraphMouse(graphMouse);
 vv.getRenderContext().setNodeLabelFunction(Object::toString);
 vv.getRenderer().getNodeLabelRenderer().setPosition(Renderer.NodeLabel.Position.CNTR);
 vv.addKeyListener(graphMouse.getModeKeyListener());
 vv.setToolTipText("<html><center>Type 'p' for Pick mode<p>Type 't' for Transform mode");
 vv.setForeground(Color.white);
 vv.scaleToLayout(scaler);
 this.add(vv);
}
origin: jrtom/jung

  graph,
  layoutAlgorithm,
  new RandomLocationTransformer<>(400, 400, 0),
  new Dimension(400, 400)),
new Dimension(400, 400));
origin: jrtom/jung

.setSize(subLayoutSize.width, subLayoutSize.height)
.setInitializer(
  new RandomLocationTransformer<>(subLayoutSize.width, subLayoutSize.height, 0))
.build();
origin: jrtom/jung

if (e.getStateChange() == ItemEvent.SELECTED) {
 layoutModel.setInitializer(
   new RandomLocationTransformer<>(layoutModel.getWidth(), layoutModel.getHeight()));
 visualizationModel.setNetwork(graph, false);
 LayoutAlgorithmTransition.apply(vv, graphLayoutAlgorithm);
edu.uci.ics.jung.layout.utilRandomLocationTransformer

Javadoc

Provides a random node location within the bounds of the width and height. This provides a random location for unmapped nodes the first time they are accessed.

Note: the generated values are not cached, so animate() will generate a new random location for the passed node every time it is called. If you want a consistent value, wrap this // * layout's generated values in a instance.

Most used methods

  • <init>
    Creates an instance with the specified dimension and random seed.
  • applyCenter
  • applyNE

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now