1 package org.splat.wapp;
4 public class PopupItem extends ContextualMenu.ContextualItem {
6 // ==============================================================================================================================
8 // ==============================================================================================================================
10 protected PopupItem () {
11 // ----------------------
12 // myicon = "image.hr.png";
14 public PopupItem (String label) {
15 // -------------------------------
17 myicon = "image.hold.gif"; // Default icon
19 // Optional attributes
20 public PopupItem action (String url) { // Enables the item
21 // --------------------------------------
25 public PopupItem confirmation (String message) {
26 // ----------------------------------------------
30 public PopupItem icon (String icon) {
31 // -----------------------------------
35 public PopupItem rename (String label) {
36 // --------------------------------------
41 // ==============================================================================================================================
42 // PopupItem specific getters
43 // ==============================================================================================================================
45 public String getConfirmationMessage () {
46 // ---------------------------------------
47 return confirm; // Null if does not need any confirmation
49 public String getLabel () {
50 // ------------------------
51 return mylabel; // Null if this is a separator
53 public boolean needConfirmation () {
54 // ----------------------------------
55 return (confirm != null);