Tabnine Logo
TickUnit
Code IndexAdd Tabnine 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)

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
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JList (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Sublime Text plugins
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