FileDocCategorySizeDatePackage
ValueRangeRecord.javaAPI DocApache Poi 3.0.114293Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

ValueRangeRecord

public class ValueRangeRecord extends Record
The value range record defines the range of the value axis. NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/records/definitions.
author
Glen Stampoultzis (glens at apache.org)

Fields Summary
public static final short
sid
private double
field_1_minimumAxisValue
private double
field_2_maximumAxisValue
private double
field_3_majorIncrement
private double
field_4_minorIncrement
private double
field_5_categoryAxisCross
private short
field_6_options
private BitField
automaticMinimum
private BitField
automaticMaximum
private BitField
automaticMajor
private BitField
automaticMinor
private BitField
automaticCategoryCrossing
private BitField
logarithmicScale
private BitField
valuesInReverse
private BitField
crossCategoryAxisAtMaximum
private BitField
reserved
Constructors Summary
public ValueRangeRecord()



     
    

    
public ValueRangeRecord(RecordInputStream in)
Constructs a ValueRange record and sets its fields appropriately.

param
id id must be 0x101f or an exception will be throw upon validation
param
size size the size of the data area of the record
param
data data of the record (should not contain sid/len)

        super(in);
    
    
Methods Summary
public java.lang.Objectclone()

        ValueRangeRecord rec = new ValueRangeRecord();
    
        rec.field_1_minimumAxisValue = field_1_minimumAxisValue;
        rec.field_2_maximumAxisValue = field_2_maximumAxisValue;
        rec.field_3_majorIncrement = field_3_majorIncrement;
        rec.field_4_minorIncrement = field_4_minorIncrement;
        rec.field_5_categoryAxisCross = field_5_categoryAxisCross;
        rec.field_6_options = field_6_options;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_minimumAxisValue       = in.readDouble();
        field_2_maximumAxisValue       = in.readDouble();
        field_3_majorIncrement         = in.readDouble();
        field_4_minorIncrement         = in.readDouble();
        field_5_categoryAxisCross      = in.readDouble();
        field_6_options                = in.readShort();

    
public doublegetCategoryAxisCross()
Get the category axis cross field for the ValueRange record.

        return field_5_categoryAxisCross;
    
public doublegetMajorIncrement()
Get the major increment field for the ValueRange record.

        return field_3_majorIncrement;
    
public doublegetMaximumAxisValue()
Get the maximum axis value field for the ValueRange record.

        return field_2_maximumAxisValue;
    
public doublegetMinimumAxisValue()
Get the minimum axis value field for the ValueRange record.

        return field_1_minimumAxisValue;
    
public doublegetMinorIncrement()
Get the minor increment field for the ValueRange record.

        return field_4_minorIncrement;
    
public shortgetOptions()
Get the options field for the ValueRange record.

        return field_6_options;
    
public intgetRecordSize()
Size of record (exluding 4 byte header)

        return 4  + 8 + 8 + 8 + 8 + 8 + 2;
    
public shortgetSid()

        return sid;
    
public booleanisAutomaticCategoryCrossing()
category crossing point is automatically selected

return
the automatic category crossing field value.

        return automaticCategoryCrossing.isSet(field_6_options);
    
public booleanisAutomaticMajor()
automatic major unit selected

return
the automatic major field value.

        return automaticMajor.isSet(field_6_options);
    
public booleanisAutomaticMaximum()
automatic maximum value selected

return
the automatic maximum field value.

        return automaticMaximum.isSet(field_6_options);
    
public booleanisAutomaticMinimum()
automatic minimum value selected

return
the automatic minimum field value.

        return automaticMinimum.isSet(field_6_options);
    
public booleanisAutomaticMinor()
automatic minor unit selected

return
the automatic minor field value.

        return automaticMinor.isSet(field_6_options);
    
public booleanisCrossCategoryAxisAtMaximum()
category axis to cross at maximum value

return
the cross category axis at maximum field value.

        return crossCategoryAxisAtMaximum.isSet(field_6_options);
    
public booleanisLogarithmicScale()
use logarithmic scale

return
the logarithmic scale field value.

        return logarithmicScale.isSet(field_6_options);
    
public booleanisReserved()
reserved, must equal 1 (excel dev. guide says otherwise)

return
the reserved field value.

        return reserved.isSet(field_6_options);
    
public booleanisValuesInReverse()
values are reverses in graph

return
the values in reverse field value.

        return valuesInReverse.isSet(field_6_options);
    
public intserialize(int offset, byte[] data)

        int pos = 0;

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        LittleEndian.putDouble(data, 4 + offset + pos, field_1_minimumAxisValue);
        LittleEndian.putDouble(data, 12 + offset + pos, field_2_maximumAxisValue);
        LittleEndian.putDouble(data, 20 + offset + pos, field_3_majorIncrement);
        LittleEndian.putDouble(data, 28 + offset + pos, field_4_minorIncrement);
        LittleEndian.putDouble(data, 36 + offset + pos, field_5_categoryAxisCross);
        LittleEndian.putShort(data, 44 + offset + pos, field_6_options);

        return getRecordSize();
    
public voidsetAutomaticCategoryCrossing(boolean value)
Sets the automatic category crossing field value. category crossing point is automatically selected

        field_6_options = automaticCategoryCrossing.setShortBoolean(field_6_options, value);
    
public voidsetAutomaticMajor(boolean value)
Sets the automatic major field value. automatic major unit selected

        field_6_options = automaticMajor.setShortBoolean(field_6_options, value);
    
public voidsetAutomaticMaximum(boolean value)
Sets the automatic maximum field value. automatic maximum value selected

        field_6_options = automaticMaximum.setShortBoolean(field_6_options, value);
    
public voidsetAutomaticMinimum(boolean value)
Sets the automatic minimum field value. automatic minimum value selected

        field_6_options = automaticMinimum.setShortBoolean(field_6_options, value);
    
public voidsetAutomaticMinor(boolean value)
Sets the automatic minor field value. automatic minor unit selected

        field_6_options = automaticMinor.setShortBoolean(field_6_options, value);
    
public voidsetCategoryAxisCross(double field_5_categoryAxisCross)
Set the category axis cross field for the ValueRange record.

        this.field_5_categoryAxisCross = field_5_categoryAxisCross;
    
public voidsetCrossCategoryAxisAtMaximum(boolean value)
Sets the cross category axis at maximum field value. category axis to cross at maximum value

        field_6_options = crossCategoryAxisAtMaximum.setShortBoolean(field_6_options, value);
    
public voidsetLogarithmicScale(boolean value)
Sets the logarithmic scale field value. use logarithmic scale

        field_6_options = logarithmicScale.setShortBoolean(field_6_options, value);
    
public voidsetMajorIncrement(double field_3_majorIncrement)
Set the major increment field for the ValueRange record.

        this.field_3_majorIncrement = field_3_majorIncrement;
    
public voidsetMaximumAxisValue(double field_2_maximumAxisValue)
Set the maximum axis value field for the ValueRange record.

        this.field_2_maximumAxisValue = field_2_maximumAxisValue;
    
public voidsetMinimumAxisValue(double field_1_minimumAxisValue)
Set the minimum axis value field for the ValueRange record.

        this.field_1_minimumAxisValue = field_1_minimumAxisValue;
    
public voidsetMinorIncrement(double field_4_minorIncrement)
Set the minor increment field for the ValueRange record.

        this.field_4_minorIncrement = field_4_minorIncrement;
    
public voidsetOptions(short field_6_options)
Set the options field for the ValueRange record.

        this.field_6_options = field_6_options;
    
public voidsetReserved(boolean value)
Sets the reserved field value. reserved, must equal 1 (excel dev. guide says otherwise)

        field_6_options = reserved.setShortBoolean(field_6_options, value);
    
public voidsetValuesInReverse(boolean value)
Sets the values in reverse field value. values are reverses in graph

        field_6_options = valuesInReverse.setShortBoolean(field_6_options, value);
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[VALUERANGE]\n");
        buffer.append("    .minimumAxisValue     = ")
            .append(" (").append( getMinimumAxisValue() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .maximumAxisValue     = ")
            .append(" (").append( getMaximumAxisValue() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .majorIncrement       = ")
            .append(" (").append( getMajorIncrement() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .minorIncrement       = ")
            .append(" (").append( getMinorIncrement() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .categoryAxisCross    = ")
            .append(" (").append( getCategoryAxisCross() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .options              = ")
            .append("0x").append(HexDump.toHex(  getOptions ()))
            .append(" (").append( getOptions() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("         .automaticMinimum         = ").append(isAutomaticMinimum()).append('\n"); 
        buffer.append("         .automaticMaximum         = ").append(isAutomaticMaximum()).append('\n"); 
        buffer.append("         .automaticMajor           = ").append(isAutomaticMajor()).append('\n"); 
        buffer.append("         .automaticMinor           = ").append(isAutomaticMinor()).append('\n"); 
        buffer.append("         .automaticCategoryCrossing     = ").append(isAutomaticCategoryCrossing()).append('\n"); 
        buffer.append("         .logarithmicScale         = ").append(isLogarithmicScale()).append('\n"); 
        buffer.append("         .valuesInReverse          = ").append(isValuesInReverse()).append('\n"); 
        buffer.append("         .crossCategoryAxisAtMaximum     = ").append(isCrossCategoryAxisAtMaximum()).append('\n"); 
        buffer.append("         .reserved                 = ").append(isReserved()).append('\n"); 

        buffer.append("[/VALUERANGE]\n");
        return buffer.toString();
    
protected voidvalidateSid(short id)
Checks the sid matches the expected side for this record

param
id the expected sid.

        if (id != sid)
        {
            throw new RecordFormatException("Not a ValueRange record");
        }