Class WebServerStatusItem
java.lang.Object
org.eclipse.jface.action.ContributionItem
com.iizigo.WebServerStatusItem
- All Implemented Interfaces:
IContributionItem
The status-line item of the internal web server in each workbench window (R-D-7 of CC-SURVEY-PORT-RANGE, CC-FIX-PORT-RANGE-A):
"Web :2801", with both ports and who holds the first ones of the ranges in its hover; a click opens Preferences > IIZI > Web Server. When the server took other ports than the first ones of its ranges, or is not running, the item shows a warning image, and once per iiziGo a balloon says so in one line - never a modal box (R-45).The item is a ContributionItem of the window's StatusLineManager, filled like the workbench's own StatusLineContributionItem (a separator and a CLabel with StatusLineLayoutData), installed by installAll() at the Designer's start-up and for every window opened later (CC-FIX-PWA-PAGE-PORTS, ruling PW-7). Until this order it was a WorkbenchWindowControlContribution in the status trim's tool bar, whose tool item gave the control 5 px of height (measured in the UI harness: size 52 x 5 for a preferred 70 x 23) and a width computed for its first text - the crop the owner saw. The hover is the Designer's own IzToolTip, a shell sized from its text, not the system tooltip; the balloon keeps one line and points at the hover.
- Author:
- Christopher Mindus
Field Summary
FieldsConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionvoidFills the status line: a separator and the label, laid out as the workbench's own status line items are, the label as wide as its widest text with the warning image.Gets the text of the hover as last set: every line of the server's state and the click line.static voidinstall(IWorkbenchWindow window) Installs the item in the status line of a window, once.static voidInstalls the item in the status line of every workbench window open now, and of every window opened later.Methods inherited from class ContributionItem
dispose, fill, fill, fill, getId, getParent, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
Field Details
ID
The ID of the item in the status line:"com.iizigo.webserver.statusItem".- See Also:
DATA_KEY
The data key of the item on its label, for the UI harness:"com.iizigo.webserver.statusItem".- See Also:
Constructor Details
WebServerStatusItem
public WebServerStatusItem()Creates the item.
Method Details
installAll
public static void installAll()Installs the item in the status line of every workbench window open now, and of every window opened later. Called on the SWT thread at the Designer's start-up.install
Installs the item in the status line of a window, once.- Parameters:
window- The window.
fill
Fills the status line: a separator and the label, laid out as the workbench's own status line items are, the label as wide as its widest text with the warning image.- Specified by:
fillin interfaceIContributionItem- Overrides:
fillin classContributionItem
getHoverText
Gets the text of the hover as last set: every line of the server's state and the click line.- Returns:
- The text, null before the first refresh.