Package org.vietspider.ui.widget

Examples of org.vietspider.ui.widget.CoolButton$NormalButtonState


   
    Label lblSeparator = new Label(this, SWT.NONE);
    lblSeparator.setText("   ");
   

    final CoolButton toggleButton = new CoolButton(this,
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_NORMAL),
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_HOVER),
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_PRESSED),
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_NORMAL_TOGGLED),
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_HOVER_TOGGLED),
        ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_PRESSED_TOGGLED));
   
    toggleButton.setHotRegionMask(ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_CHECKBOX_HOT_SPOT));
    toggleButton.setHotToggledRegionMask(ToolBoxImageRegistry.getImage(ToolBoxImageRegistry.IMG_BUTTON_HOT_SPOT_TOGGLED));
    gridData = new GridData(SWT.CENTER, SWT.CENTER, false, false);
    toggleButton.setLayoutData(gridData);
    toggleButton.setToolTipText(factory.getLabel("butComplete"));
    toggleButton.addSelectionListener(new CoolButtonSelectionListener(){
      @SuppressWarnings("unused")
      public void selectionOnPress(CoolButtonSelectionEvent e) {
        showAll = !showAll;
        Preferences prefs = Preferences.userNodeForPackage(HTMLExplorerViewer.class);
        prefs.put("showAll", String.valueOf(showAll));
      }
      @SuppressWarnings("unused")
      public void selectionOnRelease(CoolButtonSelectionEvent e) {
      }
    })
   
    Preferences prefs = Preferences.userNodeForPackage(getClass());
    String prefValue = prefs.get( "showAll", "");
    if(prefValue != null && prefValue.trim().length() > 0){
      showAll = Boolean.valueOf(prefValue).booleanValue();
    } else {
      showAll = true;
    }
    toggleButton.setSelection(showAll);
   
    butGo = resources.createIcon(this,
        resources.getImageGo(), resources.getTextGo(), new HyperlinkAdapter(){
      @SuppressWarnings("unused")
      public void linkActivated(HyperlinkEvent e) {
View Full Code Here

TOP

Related Classes of org.vietspider.ui.widget.CoolButton$NormalButtonState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.