|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.rpf.RpfColortable
public class RpfColortable
Set up the colors used in creating the images. They are created from RGB value arrays read in from the RPF file. If the number of colors that are allowed is less than 216, then the RpfColortable looks inside the RpfFile and uses the color conversion tables inside. There will still be 216 color indexes, but some of the colors will be duplicates.
Nested Class Summary | |
---|---|
static class |
RpfColortable.ColorConversionTable
|
static class |
RpfColortable.ColorOffset
|
Field Summary | |
---|---|
static int |
CADRG_COLORS
|
protected boolean |
Cib
|
static int |
CIB_SPEC_CODE_ID
|
int[] |
colorConvTable
Color conversion table (to be filled) from within frame, colortable section. |
java.awt.Color[] |
colors
The actual OMColors to use in the image construction. |
static int |
COLORS_16
|
static int |
COLORS_216
|
static int |
COLORS_32
|
static int |
DEFAULT_OPAQUENESS
|
protected int |
entryNumber
The index of the RpfEntry in the A.TOC file being used for the current colors. |
protected int |
numColors
|
protected int |
opaqueness
|
protected int |
reducedColorTable
Index to use a color conversion table, and if so, which one. |
java.lang.String |
seriesCode
Chart Series Code for these colors. |
protected int |
tocNumber
The index of the A.TOC file in the RpfTocHandler being used for the current colors. |
char |
zone
Zone ID for these colors. |
Constructor Summary | |
---|---|
RpfColortable()
|
|
RpfColortable(int nColors)
|
|
RpfColortable(int nColors,
int opaque,
boolean cib)
|
Method Summary | |
---|---|
int |
getColorTableReduction()
Returns the color reduction index. |
int |
getEntryNumber()
Not really used, but someone might need them. |
int |
getNumColors()
Returns the number of colors. |
int |
getOpaqueness()
|
int |
getOpaquePercent()
|
int |
getTocNumber()
Not really used, but someone might need them. |
boolean |
isCib()
|
boolean |
isSameATOCIndexes(int tocIndex,
int entryIndex)
Return true of the toc index and entry index are the same as what the colortable is currently holding. |
static void |
main(java.lang.String[] args)
|
java.awt.Color[] |
parseColorLookUpTable(BinaryFile binFile,
RpfFileSections.RpfLocationRecord[] loc)
The method to call to read in the colortable from within the RPF file. |
void |
setATOCIndexes(int tocIndex,
int entryIndex)
Should be set when a new colortable is read in, so that you can tell when you don't have to read a new one. |
void |
setCib(boolean value)
If this object is going to provide colors for CIB imagery, you have to let this object know that. |
void |
setFrom(RpfColortable colortable)
Load the provided colortable with the color values of this colortable. |
void |
setNumColors(int numColorsValue)
|
void |
setOpaqueness(int value)
Set the alpha values of the OMColors, which governs the transparency/opaqueness of the images. |
void |
setOpaquePercent(int percent)
Set the alpha values of the OMColors, which governs the transparency/opaqueness of the images. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CADRG_COLORS
public static final int COLORS_216
public static final int COLORS_32
public static final int COLORS_16
public static final int CIB_SPEC_CODE_ID
public static final int DEFAULT_OPAQUENESS
public int[] colorConvTable
protected int reducedColorTable
protected int numColors
protected boolean Cib
protected int opaqueness
public java.awt.Color[] colors
public char zone
public java.lang.String seriesCode
protected int tocNumber
protected int entryNumber
Constructor Detail |
---|
public RpfColortable()
public RpfColortable(int nColors)
public RpfColortable(int nColors, int opaque, boolean cib)
Method Detail |
---|
public void setFrom(RpfColortable colortable)
colortable
- public void setOpaqueness(int value)
value
- index between 0-255 (0 is transparent, 255 is opaque)public int getOpaqueness()
public void setOpaquePercent(int percent)
percent
- index between 0-100 (0 is transparent, 100 is opaque)public int getOpaquePercent()
public void setNumColors(int numColorsValue)
public int getNumColors()
public int getColorTableReduction()
public void setCib(boolean value)
value
- true if the colortable will be used for greyscale images.public boolean isCib()
public void setATOCIndexes(int tocIndex, int entryIndex)
public boolean isSameATOCIndexes(int tocIndex, int entryIndex)
public int getTocNumber()
public int getEntryNumber()
public java.awt.Color[] parseColorLookUpTable(BinaryFile binFile, RpfFileSections.RpfLocationRecord[] loc)
binFile
- the file to read it in from.loc
- the RpfLocationRecord that tells you where the sections are.
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |