public void initializeLayerTable ( ) { layerTable = new Vector ( ) ; layerNames = new Vector ( ) ; for ( int i = 0 ; i < dwgObjects . size ( ) ; i ++ ) { DwgObject obj = ( DwgObject ) dwgObjects . get ( i ) ; if ( obj instanceof DwgLayer ) { Vector layerTableRecord = new Vector ( ) ; layerTableRecord . add ( new Integer ( obj . getHandle ( ) ) ) ; layerTableRecord . add ( ( ( DwgLayer ) obj ) . getName ( ) ) ; layerTableRecord . add ( new Integer ( ( ( DwgLayer ) obj ) . getColor ( ) ) ) ; layerTable . add ( layerTableRecord ) ; layerNames . add ( ( ( DwgLayer ) obj ) . getName ( ) ) ; } } System . out . println ( "" ) ; }
Initialize a new Vector that contains the DWG file layers . Each layer have three parameters . These parameters are handle name and color