GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing wiki.eclipse.org — Nebula LED - Eclipsepedia
Jump to: navigation,
search
Nebula LEDIntroductionThis widget displays characters as if they were displayed on a LED. Usage3 components are available. LEDThis component displays a single character, and possibly a dot in the left bottom corner of the widget. To set the character to display you have to pick a value in the enumeration LEDCharacter : all letters and digits are available, plus 2 special values : CLEAR to display a blank widget (no element is lit) and MINUS to display a dash character. LED led = new LED(top, SWT.NONE); led.setCharacter(LEDCharacter.THREE); If you want to display the dot in the left bottom corner, you have to set the flag LED led = new LED(composite, SWT.ICON); led.setCharacter(LEDCharacter.THREE); led.setShowDot(true); DotsLedThis component display a colon : To switch on/off the colon, you have to use the methods DotsLed dots = new DotsLed(composite, SWT.NONE); dots.switchOn(); LEDSeparatorThis components displays a separator (thin line, white by default) LEDSeparator sep = new LEDSeparator(composite, SWT.NONE); CustomizationBecause the widget is a canvas, you can change the background color with the method For the For both LED led = new LED(top, SWT.NONE); led.setCharacter(LEDCharacter.A); Color idleColor = new Color(shell.getDisplay(), 60, 60, 60); led.setIdleColor(idleColor); Color selectedColor = new Color(shell.getDisplay(), 255, 0, 0); led.setSelectedColor(selectedColor); ExampleAn example called LEDSnippet.java is located in the plugin org.eclipse.nebula.widgets.led.snippets. This example is also available here : LEDSnippet.java
Retrieved from "https://wiki.eclipse.org/index.php?title=Nebula_LED&oldid=438764"
This page was last modified 06:34, 19 March 2020 by Eclipsepedia anonymous user Unnamed Poltroon. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |