-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
73 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
convex-gui/src/main/java/convex/gui/components/renderer/AddressRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package convex.gui.components.renderer; | ||
|
||
import javax.swing.JLabel; | ||
|
||
import convex.core.data.Address; | ||
import convex.core.util.Utils; | ||
|
||
@SuppressWarnings("serial") | ||
public class AddressRenderer extends CellRenderer { | ||
|
||
public AddressRenderer(int alignment) { | ||
super(alignment); | ||
} | ||
|
||
public AddressRenderer() { | ||
super(JLabel.LEFT); | ||
} | ||
|
||
@Override | ||
public void setValue(Object o) { | ||
String s=Utils.toString(Address.parse(o)); | ||
super.setValue(s); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ public CellRenderer(int alignment) { | |
public void setValue(Object value) { | ||
setText(Utils.toString(value)); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
convex-gui/src/main/java/convex/gui/components/renderer/StringRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package convex.gui.components.renderer; | ||
|
||
import javax.swing.JLabel; | ||
|
||
@SuppressWarnings("serial") | ||
public class StringRenderer extends CellRenderer { | ||
public StringRenderer(int alignment) { | ||
super(alignment); | ||
} | ||
|
||
public StringRenderer() { | ||
super(JLabel.RIGHT); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters