*/
public final class TSubMenu extends TMenuItem {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* The menu window. Note package private access.
*/
TMenu menu;
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Package private constructor.
*
this.menu.isSubMenu = true;
}
- /**
- * Draw the menu title.
- */
- @Override
- public void draw() {
- super.draw();
-
- CellAttributes menuColor;
- if (isAbsoluteActive()) {
- menuColor = getTheme().getColor("tmenu.highlighted");
- } else {
- if (isEnabled()) {
- menuColor = getTheme().getColor("tmenu");
- } else {
- menuColor = getTheme().getColor("tmenu.disabled");
- }
- }
-
- // Add the arrow
- getScreen().putCharXY(getWidth() - 2, 0, GraphicsChars.CP437[0x10],
- menuColor);
- }
+ // ------------------------------------------------------------------------
+ // Event handlers ---------------------------------------------------------
+ // ------------------------------------------------------------------------
/**
* Handle keystrokes.
}
}
+ // ------------------------------------------------------------------------
+ // TMenuItem --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Draw the menu title.
+ */
+ @Override
+ public void draw() {
+ super.draw();
+
+ CellAttributes menuColor;
+ if (isAbsoluteActive()) {
+ menuColor = getTheme().getColor("tmenu.highlighted");
+ } else {
+ if (isEnabled()) {
+ menuColor = getTheme().getColor("tmenu");
+ } else {
+ menuColor = getTheme().getColor("tmenu.disabled");
+ }
+ }
+
+ // Add the arrow
+ getScreen().putCharXY(getWidth() - 2, 0, GraphicsChars.CP437[0x10],
+ menuColor);
+ }
+
/**
* Override dispatch() to do nothing.
*/
return this;
}
+ // ------------------------------------------------------------------------
+ // TSubMenu ---------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Convenience function to add a custom menu item.
*
return menu.addSubMenu(title);
}
-
}