diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/StatisticsWindow.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/console/StatisticsWindow.java')
| -rw-r--r-- | NET/worlds/console/StatisticsWindow.java | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/NET/worlds/console/StatisticsWindow.java b/NET/worlds/console/StatisticsWindow.java new file mode 100644 index 0000000..85b955e --- /dev/null +++ b/NET/worlds/console/StatisticsWindow.java @@ -0,0 +1,126 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import java.awt.Dimension; +/* */ import java.awt.Event; +/* */ import java.awt.Frame; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.List; +/* */ import java.awt.Point; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StatisticsWindow +/* */ extends Frame +/* */ implements MainCallback, MainTerminalCallback, TreeCallback +/* */ { +/* */ private static final long serialVersionUID = 2184104724858956037L; +/* 36 */ Tree _tree = new Tree(this); +/* 37 */ List _list = new List(10, false); +/* */ StatMan _lastStat; +/* */ +/* */ public StatisticsWindow(Window parent) { +/* 41 */ super("Statistics Manager"); +/* */ +/* 43 */ GridBagLayout gbag = new GridBagLayout(); +/* 44 */ setLayout(gbag); +/* 45 */ GridBagConstraints c = new GridBagConstraints(); +/* 46 */ c.fill = 1; +/* 47 */ c.weightx = 0.4D; +/* 48 */ c.weighty = 1.0D; +/* 49 */ c.gridwidth = 1; +/* 50 */ c.gridheight = 0; +/* 51 */ gbag.setConstraints(this._tree, c); +/* 52 */ add(this._tree); +/* 53 */ c.weightx = 0.6D; +/* 54 */ c.gridwidth = 0; +/* 55 */ gbag.setConstraints(this._list, c); +/* 56 */ add(this._list); +/* */ +/* */ +/* 59 */ pack(); +/* 60 */ Point loc = parent.getLocation(); +/* 61 */ Dimension size = parent.getSize(); +/* 62 */ setBounds(loc.x + (size.width - 512) / 2, +/* 63 */ loc.y + (size.height - 240) / 2, 512, 240); +/* */ +/* 65 */ setVisible(true); +/* 66 */ StatisticsRoot root = StatisticsRoot.getNode(); +/* 67 */ root.setTree(this._tree); +/* 68 */ StatTreeNode rootNode = new StatTreeNode(root, null); +/* 69 */ this._tree.change(rootNode, rootNode.getObject()); +/* */ +/* */ +/* 72 */ StatMemNode.getNode(); +/* 73 */ StatNetRefNode.getNode(); +/* */ +/* */ +/* */ +/* 77 */ this._tree.change(rootNode, StatRateNode.getNode()); +/* */ +/* 79 */ Main.register(this); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event ev) +/* */ { +/* 85 */ switch (ev.id) { +/* */ case 201: +/* 87 */ if (this._lastStat != null) +/* 88 */ this._lastStat.releaseList(false); +/* 89 */ this._lastStat = null; +/* 90 */ dispose(); +/* 91 */ return true; +/* */ } +/* 93 */ return super.handleEvent(ev); +/* */ } +/* */ +/* */ +/* */ public void treeChange(Object obj) +/* */ { +/* 99 */ if (this._lastStat != null) +/* 100 */ this._lastStat.releaseList(false); +/* 101 */ this._lastStat = ((StatMan)obj); +/* 102 */ this._lastStat.grabList(this._list); +/* */ } +/* */ +/* */ +/* */ +/* */ public void treeFocusChanged(boolean hasFocus) {} +/* */ +/* */ +/* */ public void mainCallback() {} +/* */ +/* */ +/* */ public void terminalCallback() +/* */ { +/* 115 */ if (this._lastStat != null) +/* 116 */ this._lastStat.releaseList(true); +/* 117 */ this._lastStat = null; +/* 118 */ Main.unregister(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\StatisticsWindow.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |