Package com.iizigo

Class ApplicationUI

java.lang.Object
com.iizigo.ApplicationUI

public class ApplicationUI extends Object
The ApplicationUI instance holds the various images loaded from Image Descriptors and can be used as SWT Images directly, as well as other SWT allocated object such as colors.
Author:
Christopher Mindus
  • Field Details

    • ERROR_STYLER

      public static final StyledString.Styler ERROR_STYLER
      The error style color for StyledText.
    • display

      public final Display display
      The Display.
    • white

      public final Color white
    • black

      public final Color black
    • transparent

      public final Color transparent
    • gray

      public final Color gray
    • border

      public Color border
    • foreground

      public Color foreground
    • background

      public Color background
    • widgetBackground

      public Color widgetBackground
    • headerBackground

      public Color headerBackground
    • listSelectionForeground

      public Color listSelectionForeground
    • listSelectionBackground

      public Color listSelectionBackground
    • disabledForeground

      public Color disabledForeground
    • lightShadow

      public Color lightShadow
    • darkShadow

      public Color darkShadow
    • tooltipBackground

      public Color tooltipBackground
    • entryFieldFocusBackground

      public Color entryFieldFocusBackground
    • entryFieldBackground

      public Color entryFieldBackground
    • entryFieldForeground

      public Color entryFieldForeground
    • errorBackground

      public Color errorBackground
    • errorBackgroundCursor

      public Color errorBackgroundCursor
    • errorForeground

      public Color errorForeground
    • warningBackground

      public Color warningBackground
    • warningBackgroundCursor

      public Color warningBackgroundCursor
    • warningForeground

      public Color warningForeground
    • infoBackground

      public Color infoBackground
    • infoBackgroundCursor

      public Color infoBackgroundCursor
    • infoForeground

      public Color infoForeground
    • greenForeground

      public Color greenForeground
    • greenBackground

      public Color greenBackground
    • selectedPropBackground

      public Color selectedPropBackground
    • propertyValueWarning

      public Color propertyValueWarning
    • propertyValueError

      public Color propertyValueError
    • propertyValueUndefined

      public Color propertyValueUndefined
    • propertyValueDefined

      public Color propertyValueDefined
    • propertyValueInherited

      public Color propertyValueInherited
    • propertyValueOverridden

      public Color propertyValueOverridden
    • paleLine

      public Color paleLine
    • propTreeLine

      public Color propTreeLine
    • propEditorBackground

      public Color propEditorBackground
    • propEditorIconBackground

      public Color propEditorIconBackground
    • packageNameStyler

      public final StyledString.Styler packageNameStyler
      Styler used for Package Names for StyledString's.
    • projectNameStyler

      public final StyledString.Styler projectNameStyler
      Styler used for Project Names for StyledString's.
    • imageFile

      public final Image imageFile
    • imageError

      public final Image imageError
    • imageWarning

      public final Image imageWarning
    • imageInformation

      public final Image imageInformation
    • imageFolder

      public Image imageFolder
    • imageFolderSelector

      public Image imageFolderSelector
    • imageInformationCircle

      public Image imageInformationCircle
    • imageEditPen

      public Image imageEditPen
    • imageEditProperties

      public Image imageEditProperties
    • imageGotoInput

      public Image imageGotoInput
    • imageIizi

      public Image imageIizi
    • imageModule

      public Image imageModule
    • imagePanel

      public Image imagePanel
    • imageVirtualSpace

      public Image imageVirtualSpace
    • imageInfo

      public Image imageInfo
    • imageWizard

      public Image imageWizard
    • imageExtends

      public Image imageExtends
    • imageAdd

      public Image imageAdd
    • imageShow

      public Image imageShow
    • imageMore

      public Image imageMore
    • imageMore16

      public Image imageMore16
    • imageProperties

      public Image imageProperties
    • imageExpandAll

      public Image imageExpandAll
    • imageCollapseAll

      public Image imageCollapseAll
    • imageSortA2Z

      public Image imageSortA2Z
    • imageSortZ2A

      public Image imageSortZ2A
    • imageSortByType

      public Image imageSortByType
    • imageShowTree

      public Image imageShowTree
    • imageShowInherited

      public Image imageShowInherited
    • imageLinkProps

      public Image imageLinkProps
    • imageHideValues

      public Image imageHideValues
    • imageShowInEditor

      public Image imageShowInEditor
    • imageErrorDecoration

      public Image imageErrorDecoration
    • imageWarningDecoration

      public Image imageWarningDecoration
    • imageConvert

      public Image imageConvert
    • imageRichText

      public Image imageRichText
    • imageRawText

      public Image imageRawText
    • imageTagProcessing

      public Image imageTagProcessing
    • imageTextTable

      public Image imageTextTable
    • imageTranslate

      public Image imageTranslate
    • imageImport

      public Image imageImport
    • imageOpen

      public Image imageOpen
    • imageMoveProps

      public Image imageMoveProps
    • imageTextOK

      public Image imageTextOK
    • imageTextError

      public Image imageTextError
    • imageFormatPlain

      public Image imageFormatPlain
    • imageFormatPlainTag

      public Image imageFormatPlainTag
    • imageFormatHTML

      public Image imageFormatHTML
    • imageFormatHTMLTag

      public Image imageFormatHTMLTag
    • imageInsertTextID

      public Image imageInsertTextID
    • imageInsertTextIDDisabled

      public Image imageInsertTextIDDisabled
    • imageInsertTextVS

      public Image imageInsertTextVS
    • imageInsertTextVSDisabled

      public Image imageInsertTextVSDisabled
    • imageInsertHyperlinkDisabled

      public Image imageInsertHyperlinkDisabled
    • imageRemoveHyperlinkDisabled

      public Image imageRemoveHyperlinkDisabled
    • imageInsertImage

      public Image imageInsertImage
    • imageInsertImageDisabled

      public Image imageInsertImageDisabled
    • imageMoveUp

      public Image imageMoveUp
    • imageMoveDown

      public Image imageMoveDown
    • imageMoveTop

      public Image imageMoveTop
    • imageMoveBottom

      public Image imageMoveBottom
    • imageUIPanelPart

      public Image imageUIPanelPart
    • imageUIDialog

      public Image imageUIDialog
    • imageUIAccordion

      public Image imageUIAccordion
    • imageUIContainer

      public Image imageUIContainer
    • imageUIContextMenu

      public Image imageUIContextMenu
    • imageUITitlePane

      public Image imageUITitlePane
    • imageUIMenuBar

      public Image imageUIMenuBar
    • imageUIMenu

      public Image imageUIMenu
    • imageUITabContainer

      public Image imageUITabContainer
    • imageUISwapContainer

      public Image imageUISwapContainer
    • imageUILayouts

      public Image imageUILayouts
    • imageUIAbsoluteLayout

      public Image imageUIAbsoluteLayout
    • imageUIAccordionLayout

      public Image imageUIAccordionLayout
    • imageUIBorderLayout

      public Image imageUIBorderLayout
    • imageUIFlexLayout

      public Image imageUIFlexLayout
    • imageUIGridLayout

      public Image imageUIGridLayout
    • imageUITabLayout

      public Image imageUITabLayout
    • imageUISwapLayout

      public Image imageUISwapLayout
    • imageSelector

      public Image imageSelector
    • imageSelectors

      public Image imageSelectors
    • imageStyles

      public Image imageStyles
    • imageStateStyles

      public Image imageStateStyles
    • imageAsset

      public Image imageAsset
    • imageDevicePortrait

      public Image imageDevicePortrait
    • imageDeviceLandscape

      public Image imageDeviceLandscape
    • imageUIComponent

      public Image imageUIComponent
    • imageUIComponents

      public Image imageUIComponents
    • imageThemes

      public Image imageThemes
    • imageThemesError

      public Image imageThemesError
    • imageUIButton

      public Image imageUIButton
    • imageUICalendar

      public Image imageUICalendar
    • imageUICheckBox

      public Image imageUICheckBox
    • imageUIComboBox

      public Image imageUIComboBox
    • imageUIDateTime

      public Image imageUIDateTime
    • imageUIEmpty

      public Image imageUIEmpty
    • imageUILabel

      public Image imageUILabel
    • imageUIOutput

      public Image imageUIOutput
    • imageUIMenuItem

      public Image imageUIMenuItem
    • imageUICheckedMenuItem

      public Image imageUICheckedMenuItem
    • imageUIRadioMenuItem

      public Image imageUIRadioMenuItem
    • imageUIMenuSeparator

      public Image imageUIMenuSeparator
    • imageUIProgress

      public Image imageUIProgress
    • imageUIRadioButton

      public Image imageUIRadioButton
    • imageUIGauge

      public Image imageUIGauge
    • imageUISlider

      public Image imageUISlider
    • imageUISpinner

      public Image imageUISpinner
    • imageUIText

      public Image imageUIText
    • imageUITextArea

      public Image imageUITextArea
    • imageUIPicker

      public Image imageUIPicker
    • imageUIPickerSlot

      public Image imageUIPickerSlot
    • imageUITable

      public Image imageUITable
    • imageUITableColumn

      public Image imageUITableColumn
    • imageUIChart

      public Image imageUIChart
    • imageUIImage

      public Image imageUIImage
    • imageUIImage2

      public Image imageUIImage2
    • imageUICalendarList

      public Image imageUICalendarList
    • imageUICalendarEvent

      public Image imageUICalendarEvent
    • imageUIMap

      public Image imageUIMap
    • imageUIMapMarkers

      public Image imageUIMapMarkers
    • imageUIMapMarker

      public Image imageUIMapMarker
    • imageMUIButton

      public Image imageMUIButton
    • imageMUICheckBox

      public Image imageMUICheckBox
    • imageMUIRadioButton

      public Image imageMUIRadioButton
    • imageMUIList

      public Image imageMUIList
    • imageMUIHeading

      public Image imageMUIHeading
    • imageMUITabBar

      public Image imageMUITabBar
    • imageMUIProgress

      public Image imageMUIProgress
    • imageMUIProgressInd

      public Image imageMUIProgressInd
    • imageMUISlider

      public Image imageMUISlider
    • imageMUISwitch

      public Image imageMUISwitch
    • imageMUIListHeader

      public Image imageMUIListHeader
    • imageMUISimpleListItem

      public Image imageMUISimpleListItem
    • imageVSComponent

      public Image imageVSComponent
    • imageVSTable

      public Image imageVSTable
    • imageVSColumn

      public Image imageVSColumn
    • imageVSRow

      public Image imageVSRow
    • imageVSField

      public Image imageVSField
    • imageVSGroup

      public Image imageVSGroup
    • imageVSCell

      public Image imageVSCell
    • imageVSAction

      public Image imageVSAction
    • imageVSActionReference

      public Image imageVSActionReference
    • imageAction

      public Image imageAction
    • imageActions

      public Image imageActions
    • imageActionReference

      public Image imageActionReference
    • imageVSType

      public Image imageVSType
    • imageVSMessage

      public Image imageVSMessage
    • imageVSName

      public Image imageVSName
    • imageVSValue

      public Image imageVSValue
    • imageVSParticipant

      public Image imageVSParticipant
    • imageVSParticipants

      public Image imageVSParticipants
    • imageVSState

      public Image imageVSState
    • imageVSReference

      public Image imageVSReference
    • imageDescription

      public Image imageDescription
    • imageCNProperty

      public Image imageCNProperty
    • imageActors

      public Image imageActors
    • imageConnectionsIn

      public Image imageConnectionsIn
    • imageConnectionsOut

      public Image imageConnectionsOut
    • imageConnectionsOneToMany

      public Image imageConnectionsOneToMany
    • imageConnectionsManyToOne

      public Image imageConnectionsManyToOne
    • imageClear

      public Image imageClear
    • imageClearHover

      public Image imageClearHover
    • imageExpanded

      public Image imageExpanded
    • imageExpandedHover

      public Image imageExpandedHover
    • imageExpandedWarning

      public Image imageExpandedWarning
    • imageExpandedWarningHover

      public Image imageExpandedWarningHover
    • imageExpandedError

      public Image imageExpandedError
    • imageExpandedErrorHover

      public Image imageExpandedErrorHover
    • imageCollapsed

      public Image imageCollapsed
    • imageCollapsedHover

      public Image imageCollapsedHover
    • imageCollapsedWarning

      public Image imageCollapsedWarning
    • imageCollapsedWarningHover

      public Image imageCollapsedWarningHover
    • imageCollapsedError

      public Image imageCollapsedError
    • imageCollapsedErrorHover

      public Image imageCollapsedErrorHover
    • imageUndefined

      public Image imageUndefined
    • imageUndefinedHover

      public Image imageUndefinedHover
    • imageMissing

      public Image imageMissing
    • imageDefined

      public Image imageDefined
    • imageDefinedHover

      public Image imageDefinedHover
    • imageDefinedWarning

      public Image imageDefinedWarning
    • imageDefinedWarningHover

      public Image imageDefinedWarningHover
    • imageDefinedError

      public Image imageDefinedError
    • imageDefinedErrorHover

      public Image imageDefinedErrorHover
    • imagePlus

      public Image imagePlus
    • imagePlusHover

      public Image imagePlusHover
    • imageMinus

      public Image imageMinus
    • imageMinusHover

      public Image imageMinusHover
    • imageChecked

      public Image imageChecked
    • imageUnchecked

      public Image imageUnchecked
    • imageText

      public Image imageText
    • imageTextHover

      public Image imageTextHover
    • imageTextTag

      public Image imageTextTag
    • imageTextTagHover

      public Image imageTextTagHover
    • imageHTML

      public Image imageHTML
    • imageHTMLHover

      public Image imageHTMLHover
    • imageHTMLTag

      public Image imageHTMLTag
    • imageHTMLTagHover

      public Image imageHTMLTagHover
    • imageHoverButton

      public Image imageHoverButton
    • imageDownButton

      public Image imageDownButton
    • imageModulePackage

      public Image imageModulePackage
    • imageModulePackageEmpty

      public Image imageModulePackageEmpty
    • imageModulePackageNameError

      public Image imageModulePackageNameError
    • imageImageDefinition

      public Image imageImageDefinition
    • imageFontFaces

      public Image imageFontFaces
    • imageFontIconsDefinition

      public Image imageFontIconsDefinition
    • imageFontIconDefinition

      public Image imageFontIconDefinition
    • imageFontFiles

      public Image imageFontFiles
    • imageFontFile

      public Image imageFontFile
    • imageSingleImage

      public Image imageSingleImage
    • imageMultipleImages

      public Image imageMultipleImages
    • imageStyledImage

      public Image imageStyledImage
    • imageImageLocation

      public Image imageImageLocation
    • imageImageResolution

      public Image imageImageResolution
    • imageImageStyle

      public Image imageImageStyle
    • imageSVGDefinition

      public Image imageSVGDefinition
    • imageClass

      public Image imageClass
    • imageJavaMethodInstance

      public Image imageJavaMethodInstance
    • imageJavaMethodStatic

      public Image imageJavaMethodStatic
    • imageJavaMethodInstanceLarge

      public Image imageJavaMethodInstanceLarge
    • imageJavaMethodStaticLarge

      public Image imageJavaMethodStaticLarge
    • imageJavaActionActor

      public Image imageJavaActionActor
    • imageNewFieldActor

      public Image imageNewFieldActor
    • imageNewActionActor

      public Image imageNewActionActor
    • checkBoxChecked

      public Image checkBoxChecked
    • checkBoxUnchecked

      public Image checkBoxUnchecked
    • checkBoxCheckedDisabled

      public Image checkBoxCheckedDisabled
    • checkBoxUncheckedDisabled

      public Image checkBoxUncheckedDisabled
    • radioButtonSelected

      public Image radioButtonSelected
    • radioButtonUnselected

      public Image radioButtonUnselected
    • radioButtonSelectedDisabled

      public Image radioButtonSelectedDisabled
    • radioButtonUnselectedDisabled

      public Image radioButtonUnselectedDisabled
    • deviceCast

      public Image deviceCast
    • deviceCastDisabled

      public Image deviceCastDisabled
  • Method Details

    • autoScaleDown

      public static int autoScaleDown(int size)
      Auto-scales down for high DPI displays.
      Parameters:
      size - Value to scale down.
      Returns:
      The scaled value if supported, otherwise the same value.
    • autoScaleUp

      public static int autoScaleUp(int size)
      Auto-scales up for high DPI displays.
      Parameters:
      size - Value to scale up.
      Returns:
      The scaled value if supported, otherwise the same value.
    • addThemeListener

      public static boolean addThemeListener(IThemeListener listener)
      Call this method to register for theme changes.
      Parameters:
      listener - The listener.
      Returns:
      true if the listener was added, false otherwise.
      Throws:
      NullPointerException - If the listener is null.
    • addThemeListener

      public static boolean addThemeListener(IThemeListener listener, Control widget)
      Call this method to register for theme changes and automatic removal of its listener when the widget is disposed of.
      Parameters:
      listener - The listener.
      widget - The widget or container to listen to for dispose.
      Returns:
      true if the listener was added, false otherwise.
      Throws:
      NullPointerException - If the listener is null.
    • removeThemeListener

      public static boolean removeThemeListener(IThemeListener listener)
      Call this method to register for theme changes.
      Parameters:
      listener - The listener.
      Returns:
      true if the listener was removed, false otherwise.
      Throws:
      NullPointerException - If the listener is null.
    • getInstance

      public static ApplicationUI getInstance()
      Gets the instance of the ApplicationUI. The first time this is done, it must be from the SWT thread, otherwise an InternalError is thrown.
      Returns:
      The singleton instance of the ApplicationUI.
    • isInstanceCreated

      public static boolean isInstanceCreated()
      Checks if the ApplicationUI instance is created.
      Returns:
      true if ApplicationUI is created or not.
    • isAutoScaled

      public boolean isAutoScaled()
      Gets the flag not to use scaling because it's automatic.
      Returns:
      true if Eclipse and SWT automatically adjust values to scale, false otherwise.
    • getTheme

      public ApplicationUI.Theme getTheme()
      Gets the current theme.
      Returns:
      The current theme.
    • isDarkMode

      public boolean isDarkMode()
      Checks if a "dark" mode is used, e.g. using ApplicationUI.Theme.DARK. In the future, it could be other dark themes, but right now, "there can be only one"!
      Returns:
      The flag, generally affecting images and/or colors.
    • getColor

      public Color getColor(int rgb)
      Gets a color and adds it to be disposed of when the plug-in exits. If the color has been created previously, that one is returned. This call must be done from the SWT thread.
      Parameters:
      rgb - The RGB color value between 0x000000 and 0xFFFFFF.
      Returns:
      The new Color instance, or a cached one.
    • getColor

      public Color getColor(int r, int g, int b)
      Gets a color and adds it to be disposed of when the plug-in exits. If the color has been created previously, that one is returned. This call must be done from the SWT thread.
      Parameters:
      r - The red color 0-255.
      g - The green color 0-255.
      b - The blue color 0-255.
      Returns:
      The new Color instance, or a cached one.
    • getFont

      public Font getFont(String name, int height, int style)
      Gets a font and adds it to be disposed of when the plug-in exits. If the font has been created previously, the same font is returned. This call must be done from the SWT thread.
      Parameters:
      name - The name of the font.
      height - The height of the font in pixels.
      style - The style of the font.
      Returns:
      A new of cached font instance.
    • getImage

      public Image getImage(String fileName)
      Gets an Image from a file name.
      Parameters:
      fileName - The file name loads a descriptor from the "icons" folder.
      Returns:
      A new or cached image of the file name.
    • getImage

      public Image getImage(ImageDescriptor descriptor)
      Loads the image for an Image Descriptor and caches it. It will be disposed of when the plug-in exits.
      Parameters:
      descriptor - The Image Descriptor or null if none.
      Returns:
      The image created, null for none or when Image Descriptor is null.
    • removeImage

      public boolean removeImage(Image image)
      Removes an image and its image descriptor once loaded.
      Parameters:
      image - The image to remove.
      Returns:
      true if the image was removed, false otherwise.
    • getDecoratedImage

      public Image getDecoratedImage(Image image, int errorLevel)
      Creates or gets a (perhaps) decorated image for warning/errors. Error level is the same as IMarker.SEVERITY_*.
      Parameters:
      image - The image to decorate.
      errorLevel - 0=no decoration, 1=warning, 2=error.
      Returns:
      The (perhaps) decorated image. The image is cached in order to reuse the decoration for that image.
    • getImage

      public Image getImage(GProp<?> property)
      Gets an Image for a property.
      Parameters:
      property - The property instance or null for none.
      Returns:
      The Image or null for none or property instance is null.
    • getImage

      public <GPROP extends GProp<?>> Image getImage(Class<GPROP> propertyClass)
      Gets an Image for a property class.
      Type Parameters:
      GPROP - The GProperty from the property class.
      Parameters:
      propertyClass - The property class.
      Returns:
      The Image Descriptor or null for none.
    • getImage

      public Image getImage(DesignerProp dp)
      Gets the Image for a DesignerProp instance.
      Parameters:
      dp - The Designer property instance.
      Returns:
      The Image, or null if dp is null.
    • getErrorImage

      public Image getErrorImage(IPropErrorItem errorItem)
      Gets the image for the property error severity level.
      Parameters:
      errorItem - An instance of an error item.
      Returns:
      The cached image for the severity in question, null for no image.
    • getErrorImage

      public Image getErrorImage(int level)
      Gets the image for the property error level 0=INFO, 1=WARNING, 2=ERROR.
      Parameters:
      level - The error level (0-2).
      Returns:
      The cached image for the severity, or null if the level is not 0-2.
    • getErrorImageDecoration

      public Image getErrorImageDecoration(int level)
      Gets the small decoration images for the property error levels 1=WARNING, 2=ERROR.
      Parameters:
      level - The error level (1-2).
      Returns:
      The cached image for the severity, or null if the level is not 1-2.
    • getWorkBenchImage

      public Image getWorkBenchImage(String name)
      Gets a Workbench Shared image by a name.
      Parameters:
      name - The name defined in org.eclipse.ui.ISharedImages.
      Returns:
      The cached image, or null if not found.
    • loadWorkBenchImages

      public void loadWorkBenchImages(ToolItem item, String name)
      Loads a set of workbench Image's from its symbolic names defined in org.eclipse.ui.ISharedImages and assigns it to the ToolItem. The "_DISABLED" image will be loaded and used if defined.
      Parameters:
      item - The tool bar item.
      name - The name of the image.
    • applyHeaderGradient

      public void applyHeaderGradient(Composite c)
      Applies a gradient on a composite in light mode, and in dark mode, just use the default widget background.
      Parameters:
      c - The composite.
    • center

      public void center(Shell shell, int w, int h)
      Centers the window on screen over its parent and sets the size.
      Parameters:
      shell - The window shell.
      w - Width of window, zero for none, negative not to scale.
      h - Height of window, zero for none, negative not to scale.
    • center

      public void center(Shell shell, String image, int w, int h)
      Centers the window on screen over its parent and sets the size and image.
      Parameters:
      shell - The window shell.
      image - The image for the dialog relative the icon directory.
      w - Width of window, zero for none, negative not to scale.
      h - Height of window, zero for none, negative not to scale.
    • center

      public void center(Shell shell, Class<?> clazz, int w, int h)
      Centers the window on screen over its parent and sets the size. The dialog size is kept to restore next time it's opened.
      Parameters:
      shell - The window shell.
      clazz - The class to remember the size of the dialog for, null for none.
      w - Width of window, zero for none, negative not to scale.
      h - Height of window, zero for none, negative not to scale.
    • center

      public void center(Shell shell, Class<?> clazz, String image, int w, int h)
      Centers the window on screen over its parent and sets the size and image. The dialog size is kept to restore next time it's opened.
      Parameters:
      shell - The window shell.
      clazz - The class to remember the size of the dialog for, null for none.
      image - The image for the dialog relative the icon directory, null for none.
      w - Width of window, zero for none, negative not to scale.
      h - Height of window, zero for none, negative not to scale.
    • center

      public void center(Shell shell, String className, String image, int w, int h)
      Centers the window on screen over its parent and sets the size and image. The dialog size is kept to restore next time it's opened.
      Parameters:
      shell - The window shell.
      className - The class to remember the size of the dialog for, null for none.
      image - The image for the dialog relative the icon directory, null for none.
      w - Width of window, zero for none, negative not to scale.
      h - Height of window, zero for none, negative not to scale.
    • cx

      public int cx(int w)
      Calculates the width of an element with the dialog font.
      Parameters:
      w - The width in pixel for the 100% font.
      Returns:
      The width to use.
    • cy

      public int cy(int h)
      Calculates the height of an element with the dialog font.
      Parameters:
      h - The width in pixel for the 100% font.
      Returns:
      The height to use.
    • s2

      public int s2()
      Gets the spacing of 2 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s4

      public int s4()
      Gets the spacing of 4 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s5

      public int s5()
      Gets the spacing of 5 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s8

      public int s8()
      Gets the spacing of 8 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s10

      public int s10()
      Gets the spacing of 5 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s15

      public int s15()
      Gets the spacing of 5 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • s20

      public int s20()
      Gets the spacing of 5 "pixels" depending on font scaling.
      Returns:
      The pixel value.
    • cyProperty

      public int cyProperty()
      Gets the height of each item for properties.
      Returns:
      The default height is 16.
    • getNormalFont

      public Font getNormalFont()
      Gets the default dialog normal font.
      Returns:
      The normal font.
    • getHeadingFont

      public Font getHeadingFont()
      Gets a heading font.
      Returns:
      The font.
    • getBoldFont

      public Font getBoldFont()
      Gets a bold font for a standard component.
      Returns:
      The font.
    • getItalicFont

      public Font getItalicFont()
      Gets an italic font for a standard component.
      Returns:
      The font.
    • getFixedFont

      public Font getFixedFont()
      Gets the standard fixed font.
      Returns:
      The font.
    • loadWorkBenchImages

      public void loadWorkBenchImages(ToolItem item, String nameEnabled, String nameDisabled)
      Loads a set of workbench Image's from its symbolic names defined in org.eclipse.ui.ISharedImages and assigns it to the ToolItem.
      Parameters:
      item - The tool bar item.
      nameEnabled - The name of the enabled image.
      nameDisabled - The name of the disabled image.
    • getNewImageDescriptor

      public ImageDescriptor getNewImageDescriptor(Image image)
      Creates a "New item" image descriptor from an existing image.
      Parameters:
      image - The image.
      Returns:
      The cached image descriptor with a "new item decorator" on the top-right corner.
    • getNewImage

      public Image getNewImage(Image image)
      Creates a "New item" image from an existing image.
      Parameters:
      image - The image.
      Returns:
      A cached image with a "new item decorator" on the top-right corner.
    • getWizardImage

      public Image getWizardImage(Image image)
      Creates a "wizard" image from an existing image.
      Parameters:
      image - The image.
      Returns:
      A cached image with the overlay of a new-wizard.