Skip to content

Commit

Permalink
Use getter for encoding information in Symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
woo-j committed Apr 8, 2015
1 parent 1fddcca commit 5e7f3d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/uk/org/okapibarcode/backend/Symbol.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public abstract class Symbol {
protected int symbol_width;
protected int default_height;
protected boolean readerInit;
public String encodeInfo = "";
protected String encodeInfo = "";

public enum DataType {
UTF8, LATIN1, BINARY, GS1, HIBC
Expand Down Expand Up @@ -74,6 +74,10 @@ public final void unsetReaderInit() {
public int getWidth() {
return symbol_width;
}

public String getEncodeInfo() {
return encodeInfo;
}

// TODO: surely we'll need something better than this to account for the height
// of the human readable aspect of different bar codes
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/uk/org/okapibarcode/gui/OkapiUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ public void encodeData() {
displayPanel.setBackground(paperColour);
displayPanel.add(drawSymbol);
topPanel.add(displayPanel);
encodeInfoArea.setText(symbol.encodeInfo);
encodeInfoArea.setText(symbol.getEncodeInfo());
topPanel.updateUI();
pack();
}
Expand Down

0 comments on commit 5e7f3d3

Please sign in to comment.