This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation to the PlotRender class and updated some of its code
to make it more customizable. Also made a method private, hence the change to MultiPlot in which I simplified some code. Created a sub-class of it called ParaViewPlotRender. It does nothing special yet. Signed-off-by: Jordan <jordan.deyton@gmail.com>
- Loading branch information
Showing
4 changed files
with
240 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ice.viz.service.paraview/src/org/eclipse/ice/viz/service/paraview/ParaViewPlotRender.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.eclipse.ice.viz.service.paraview; | ||
|
||
import java.util.Random; | ||
|
||
import org.eclipse.ice.viz.service.PlotRender; | ||
import org.eclipse.swt.graphics.Color; | ||
import org.eclipse.swt.widgets.Composite; | ||
|
||
public class ParaViewPlotRender extends PlotRender { | ||
|
||
public ParaViewPlotRender(Composite parent, ParaViewPlot plot) { | ||
super(parent, plot); | ||
|
||
} | ||
|
||
@Override | ||
protected Composite createPlotComposite(Composite parent, int style) | ||
throws Exception { | ||
// TODO Hook this up to the ParaView widgets. | ||
return new Composite(parent, style); | ||
} | ||
|
||
@Override | ||
protected void updatePlotComposite(Composite plotComposite) | ||
throws Exception { | ||
// TODO Hook this up to the ParaView widgets. | ||
int seed = (getPlotCategory() + getPlotType()).hashCode(); | ||
Random r = new Random(seed); | ||
plotComposite.setBackground(new Color(plotComposite.getDisplay(), r | ||
.nextInt(255), r.nextInt(255), r.nextInt(255))); | ||
} | ||
|
||
@Override | ||
protected void disposePlotComposite(Composite plotComposite) { | ||
// Nothing to do yet. | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.