DragonAlpha Posted April 12, 2016 Share Posted April 12, 2016 (edited) You can still just cache a text file with a unique key generated by you to track anonymously-ish. getUsername() didn't map to the forum username anyways I think isMirrorMode isVIP deprecated and yes getUsername() only returned "-username" exactly, but it's meant to be the forum login name. Caching these values is a separate process from obtaining them. The obtaining methods, the 2 I'm most interested: isVIP isMirrorMode are deprecated now . Caching values is useless if you can't obtain them in the first place to cache them so I'm not sure what you are talking about. Edited April 12, 2016 by DragonAlpha Link to comment
Botre Posted April 12, 2016 Share Posted April 12, 2016 isMirrorMode isVIP deprecated and yes getUsername() only returned "-username" exactly, but it's meant to be the forum login name. Caching these values is a separate process from obtaining them. The obtaining methods, the 2 I'm most interested: isVIP isMirrorMode are deprecated now . Caching values is useless if you can't obtain them in the first place to cache them so I'm not sure what you are talking about. I was talking about tracking data for dynamic sigs and stuff like that. isVIP... meh. isMirror... sucks it's gone Link to comment
DragonAlpha Posted April 13, 2016 Share Posted April 13, 2016 I was talking about tracking data for dynamic sigs and stuff like that. isVIP... meh. isMirror... sucks it's gone It just occurred to me you don't have access to my Dev stats thread. (Scripting forum). It's just the auto-exception reporting and manual bug reporting we discussed on skype, there will be no signature stuff. Link to comment
liverare Posted April 13, 2016 Share Posted April 13, 2016 (edited) I'm working on something that might be of interest: JObjectTable. I've used a combination of Reflection, Annotations and Swing components to enhance the JTable and DefaultTableModel and make it simpler to implement views for object instances. The reflection allows for both the getting and setting of variables and the annotations define the parameters of the JTable. Implementation: Main.java public class Main extends JFrame { public static void main(String[] args) { JObjectTable<Animal> table = new JObjectTable<>(Animal.class); table.addValue(new Animal("Muddy", Animal.Type.CAT, 10, 10.99, "CatShop")); table.addValue(new Animal("Tip", Animal.Type.BIRD, 8, 59.99, "Beaks")); table.addValue(new Animal("Big Blue", Animal.Type.ELEPHANT, 7, 1092.00, "Exotic Now!")); table.addValue(new Animal("Bubbles", Animal.Type.FISH, 5, 5.10, "ShopCo")); table.addValue(new Animal("Cookie", Animal.Type.CAT, 12, 12.50, "ShopCo")); table.addValue(new Animal("Tag", Animal.Type.DOG, 15, 15.90, "ShopCo")); JFrame frame = new JFrame(); frame.setTitle("Animals!"); frame.setSize(512, 512); frame.setLocationRelativeTo(frame.getOwner()); frame.setLayout(new BorderLayout()); frame.add(table.getTableHeader(), BorderLayout.NORTH); frame.add(new JScrollPane(table), BorderLayout.CENTER); frame.setVisible(true); } } Animal.java public class Animal { public static final String TO_STRING_FORMAT = "{id=%s, name=%s, type=%s, age=%s}"; private static int count = 0; @ColumnAttribute(index = 1, name = "ID", editable = false, nullable = false, unique = true) private final Integer id; @ColumnAttribute(index = 2, name = "Name", editable = true, nullable = false, unique = false) private String name; @ColumnAttribute(index = 3, name = "Type", editable = true, nullable = true, unique = false) private Type type; @ColumnAttribute(index = 4, name = "Age", editable = true, nullable = false, unique = false) private Integer age; @ColumnAttribute(index = 5, name = "Something", editable = true, nullable = false, unique = false) private Recipt recipt; public Animal(String name, Type type, Integer age, Double price, String company) { super(); this.id = (count++); this.name = name; this.type = type; this.age = age; this.recipt = new Recipt(price, company); } @Override public String toString() { return String.format(TO_STRING_FORMAT, id, name, type, age); } public static enum Type { CAT, DOG, FISH, BIRD, ELEPHANT; } } Recipt.java public class Recipt { public static final String TO_STRING_FORMAT = "{id=%s, price=%s, company=%s}"; private static int count; @ColumnAttribute(index = 0, name = "ID", editable = false, nullable = false, unique = true) private final Integer id; @ColumnAttribute(index = 2, name = "Price", editable = true, nullable = true, unique = false) private Double price; @ColumnAttribute(index = 1, name = "Company", editable = true, nullable = false, unique = false) private String company; public Recipt(double price, String company) { this.id = (count++); this.price = price; this.company = company; } @Override public String toString() { return String.format(TO_STRING_FORMAT, id, price, company); } public int getId() { return id; } public double getPrice() { return price; } public String getCompany() { return company; } } I'm implementing editors to handle all data types. Primitive data is not yet supported, and If the data type is an object, the rendering results in a button which'll open up a new window with the properties of that object. If the object type is enum then there'll be a combo box, etc. It might be something useful for Widgets. Edited April 13, 2016 by liverare 1 Link to comment