/** * Creates a shaded mask over the component, effectively preventing direct user interaction. */ public void addMask() { addMask(null); }
/** * Creates a busy message covering the specified target. A busy message consists of a mask the * covers and prevents interaction with the target component and a message centered within the * mask. * * @param target The target of the busy message. * @param message The message to be displayed. If null, any existing message is removed. */ public static void busy(BaseUIComponent target, String message) { if (message == null || message.isEmpty()) { target.removeMask(); } else { target.addMask(message); } }
/** * Queues an action to be performed. * * @param action Action to be performed. */ private void doAction(Action action) { Event event = new Event("action", root, action); setMessage(null); root.addMask(action + "..."); EventUtil.post(event); }
/** * Show or hide the design mode mask. */ public void update() { boolean shouldShow = shouldShow(); if (visible != shouldShow) { visible = shouldShow; BaseUIComponent target = element.getMaskTarget(); if (visible) { Menupopup contextMenu = ElementUI.getDesignContextMenu(target); String displayName = element.getDisplayName(); target.addMask(displayName, contextMenu); } else { target.removeMask(); } } }