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

How to use
TickUnit
in
org.jfree.chart.axis

Best Java code snippets using org.jfree.chart.axis.TickUnit (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: jfree/jfreechart

/**
 * Tests this formatter for equality with an arbitrary object.
 *
 * @param obj  the object ({@code null} permitted).
 *
 * @return A boolean.
 */
@Override
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof NumberTickUnit)) {
    return false;
  }
  if (!super.equals(obj)) {
    return false;
  }
  NumberTickUnit that = (NumberTickUnit) obj;
  if (!this.formatter.equals(that.formatter)) {
    return false;
  }
  return true;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Compares this tick unit to an arbitrary object.
 *
 * @param object  the object to compare against.
 *
 * @return <code>1</code> if the size of the other object is less than this,
 *      <code>0</code> if both have the same size and <code>-1</code> this
 *      size is less than the others.
 */
public int compareTo(Object object) {
  if (object instanceof TickUnit) {
    TickUnit other = (TickUnit) object;
    if (this.size > other.getSize()) {
      return 1;
    }
    else if (this.size < other.getSize()) {
      return -1;
    }
    else {
      return 0;
    }
  }
  else {
    return -1;
  }
}
origin: jfree/jfreechart

/**
 * Returns a hash code for this instance.
 *
 * @return A hash code.
 */
@Override
public int hashCode() {
  int result = super.hashCode();
  result = 29 * result + (this.formatter != null
      ? this.formatter.hashCode() : 0);
  return result;
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Generates a list of tick values for the angular tick marks.
 *
 * @return A list of {@link NumberTick} instances.
 *
 * @since 1.0.10
 */
protected List refreshAngleTicks() {
  List ticks = new ArrayList();
  for (double currentTickVal = 0.0; currentTickVal < 360.0;
      currentTickVal += this.angleTickUnit.getSize()) {
    NumberTick tick = new NumberTick(new Double(currentTickVal),
      this.angleTickUnit.valueToString(currentTickVal),
      TextAnchor.CENTER, TextAnchor.CENTER, 0.0);
    ticks.add(tick);
  }
  return ticks;
}
origin: jfree/jfreechart

double size = tu.getSize();
int count = calculateVisibleTickCount();
double lowestTickValue = calculateLowestVisibleTickValue();
  int minorTickSpaces = getMinorTickCount();
  if (minorTickSpaces <= 0) {
    minorTickSpaces = tu.getMinorTickCount();
origin: jfree/jfreechart

    candidate);
double candidateWidth = exponentLengthToJava2D(candidate.getSize(), 
    dataArea, edge);
if (tickLabelWidth < candidateWidth) {
  prevCandidate = candidate;
  candidate = tickUnits.getLargerTickUnit(prevCandidate);
  if (candidate.equals(prevCandidate)) {
    found = true;  // there are no more candidates
origin: jfree/jfreechart

lowerStr = unit.valueToString(lower);
upperStr = unit.valueToString(upper);
origin: tflobbe/solrmeter

  @Override
  public TickUnit getLargerTickUnit(TickUnit unit) {
    TickUnit newUnit = decorated.getLargerTickUnit(unit);
    if(newUnit.compareTo(lowerUnit)<0) {
      return lowerUnit;
    } else {
      return newUnit;
    }
  }
};
origin: org.codehaus.jtstand/jtstand-chart

double size = tu.getSize();
int count = calculateVisibleTickCount();
double lowestTickValue = calculateLowestVisibleTickValue();
  int minorTickSpaces = getMinorTickCount();
  if (minorTickSpaces <= 0) {
    minorTickSpaces = tu.getMinorTickCount();
origin: jfree/jfreechart

/**
 * Generates a list of tick values for the angular tick marks.
 *
 * @return A list of {@link NumberTick} instances.
 *
 * @since 1.0.10
 */
protected List refreshAngleTicks() {
  List ticks = new ArrayList();
  for (double currentTickVal = 0.0; currentTickVal < 360.0;
      currentTickVal += this.angleTickUnit.getSize()) {
    TextAnchor ta = calculateTextAnchor(currentTickVal);
    NumberTick tick = new NumberTick(new Double(currentTickVal),
      this.angleTickUnit.valueToString(currentTickVal),
      ta, TextAnchor.CENTER, 0.0);
    ticks.add(tick);
  }
  return ticks;
}
origin: jfree/jfreechart

double tickLabelHeight = estimateMaximumTickLabelHeight(g2);
double candidateHeight = exponentLengthToJava2D(candidate.getSize(), 
    dataArea, edge);
if (tickLabelHeight < candidateHeight) {
  prevCandidate = candidate;
  candidate = tickUnits.getLargerTickUnit(prevCandidate);
  if (candidate.equals(prevCandidate)) {
    found = true;  // there are no more candidates
origin: org.codehaus.jtstand/jtstand-chart

lowerStr = unit.valueToString(lower);
upperStr = unit.valueToString(upper);
origin: tflobbe/solrmeter

@Override
public TickUnit getCeilingTickUnit(double size) {
  TickUnit newUnit = decorated.getCeilingTickUnit(size);
  if(newUnit.compareTo(lowerUnit)<0) {
    return lowerUnit;
  } else {
    return newUnit;
  }
}
 
origin: jfree/jfreechart

double size = tu.getSize();
int count = calculateVisibleTickCount();
double lowestTickValue = calculateLowestVisibleTickValue();
  int minorTickSpaces = getMinorTickCount();
  if (minorTickSpaces <= 0) {
    minorTickSpaces = tu.getMinorTickCount();
origin: jfree/jfreechart

/**
 * Compares this tick unit to an arbitrary object.
 *
 * @param object  the object to compare against.
 *
 * @return {@code 1} if the size of the other object is less than this,
 *      {@code 0} if both have the same size and {@code -1} this
 *      size is less than the others.
 */
@Override
public int compareTo(Object object) {
  if (object instanceof TickUnit) {
    TickUnit other = (TickUnit) object;
    if (this.size > other.getSize()) {
      return 1;
    }
    else if (this.size < other.getSize()) {
      return -1;
    }
    else {
      return 0;
    }
  }
  else {
    return -1;
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Tests this formatter for equality with an arbitrary object.
 *
 * @param obj  the object (<code>null</code> permitted).
 *
 * @return A boolean.
 */
public boolean equals(Object obj) {
  if (obj == this) {
    return true;
  }
  if (!(obj instanceof NumberTickUnit)) {
    return false;
  }
  if (!super.equals(obj)) {
    return false;
  }
  NumberTickUnit that = (NumberTickUnit) obj;
  if (!this.formatter.equals(that.formatter)) {
    return false;
  }
  return true;
}
origin: org.codehaus.jtstand/jtstand-chart

lowerStr = unit.valueToString(lower);
upperStr = unit.valueToString(upper);
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a hash code for this instance.
 *
 * @return A hash code.
 */
public int hashCode() {
  int result = super.hashCode();
  result = 29 * result + (this.formatter != null
      ? this.formatter.hashCode() : 0);
  return result;
}
origin: tflobbe/solrmeter

@Override
public TickUnit getCeilingTickUnit(TickUnit unit) {
  TickUnit newUnit = decorated.getCeilingTickUnit(unit);
  if(newUnit.compareTo(lowerUnit)<0) {
    return lowerUnit;
  } else {
    return newUnit;
  }
}
 
origin: org.codehaus.jtstand/jtstand-chart

double size = tu.getSize();
int count = calculateVisibleTickCount();
double lowestTickValue = calculateLowestVisibleTickValue();
  int minorTickSpaces = getMinorTickCount();
  if (minorTickSpaces <= 0) {
    minorTickSpaces = tu.getMinorTickCount();
org.jfree.chart.axisTickUnit

Javadoc

Base class representing a tick unit. This determines the spacing of the tick marks on an axis.

This class (and any subclasses) should be immutable, the reason being that ORDERED collections of tick units are maintained and if one instance can be changed, it may destroy the order of the collection that it belongs to. In addition, if the implementations are immutable, they can belong to multiple collections.

Most used methods

  • equals
    Tests this unit for equality with another object.
  • getMinorTickCount
    Returns the minor tick count.
  • getSize
    Returns the size of the tick unit.
  • hashCode
    Returns a hash code for this instance.
  • valueToString
    Converts the supplied value to a string. Subclasses may implement special formatting by overriding t
  • compareTo
    Compares this tick unit to an arbitrary object.

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
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