//-------------------------------------------------------- //--- BarCode39.java v. 1.0 dated 19/04/97 by Artur Goulart //--- This class is capable of drawing a barcode type 39 on a //--- GraphicsMedium //--- Description: //--- //--- variables [BarCode39S.] //--- //--- constructors [BarCode39SInstance = new BarCode39S (...)] //--- BarCode39S () //--- instance and do nothing //--- BarCode39S (String textToCode, int narrowBarWidth, int xMargin, //--- int yMargin, boolean border, Graphics graphicsContext, Rectangle place) //--- instance and define the text to code, x and y margins, //--- existence of a border and draw it on the graphics medium //--- and where to draw it. //--- The graphics medium is not retained. //--- //--- methods [BarCode39SInstance. (...)] //--- public String getText () //--- public void setText(String newText) //--- gets and sets the text to be coded into a barcode //--- //--- public int getNarrow () //--- public void setNarrow(int newNarrow) //--- gets and sets the "X" element size that will be used for the small bar width, //--- char separator and the silent area which equals 10 X elements. //--- It's an integer in the range 1 to 5 //--- //--- public int getXBorder () //--- public void setXBorder(int newXMargin) //--- the horizontal margin around the barcode. Integer 0 to 20 //--- //--- public int getYBorder () //--- public void setYBorder(int newYMargin) //--- the vertical margin around the barcode. Integer 0 to 20 //--- //--- public boolean getUseBorder () //--- public void setUseBorder (boolean newBorder) //--- controls the drawing of a border around the barcode //--- //--- public Dimension requiredDimension () //--- answers the dimension that should be available at the //--- graphics medium for the barcode to be fully viewable, //--- given the current text to code, narrow width and margins //--- //--- public void drawUsing (Graphics g, Rectangle r) //--- draws the barcode on the graphics medium at the position //--- dictated by the rectangle r, //--- given the current text to code, narrow width and margins //--- //--------------------------------------------------------