Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make m_axis field available to subclasses of AxisLabelLayout #4

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<javac srcdir="${build.prefuse.src}"
destdir="${build.prefuse.dest}"
classpath="${lucene.lib}"
debug="${debug}"
debug="true" debuglevel="lines,vars,source"
deprecation="${deprecation}"
optimize="${optimize}"/>
</target>
Expand Down Expand Up @@ -308,4 +308,4 @@

</project>

<!-- End of file -->
<!-- End of file -->
9 changes: 9 additions & 0 deletions src/prefuse/action/assignment/DataColorAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ public void setDataType(int type) {
public int getScale() {
return m_scale;
}

/**
* Set the palette this DataColorAction uses to assign colors.
* @param array of RGB values
*/
public void setPalette(int[] palette) {
m_palette = palette;
setup();
}

/**
* Set the scale (linear, square root, or log) to use for encoding color
Expand Down
8 changes: 8 additions & 0 deletions src/prefuse/action/layout/AxisLabelLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -594,4 +594,12 @@ protected VisualTable getTable() {
}
}

/**
* Returns whether this AxisLabelLayout
* manages an X or Y axis
*/
protected int getAxis() {
return m_axis;
}

} // end of class AxisLabels
2 changes: 1 addition & 1 deletion src/prefuse/render/AxisRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void render(Graphics2D g, VisualItem item) {
String str = item.getString(VisualItem.LABEL);
AffineTransform origTransform = g.getTransform();
AffineTransform transform = this.getTransform(item);
if ( transform != null ) g.setTransform(transform);
if ( transform != null ) g.transform(transform);

g.setFont(item.getFont());
g.setColor(ColorLib.getColor(item.getTextColor()));
Expand Down