Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.contribution.visualiser.simpleImpl
Class SimpleMarkupKind

    java.lang.Object
      org.eclipse.contribution.visualiser.simpleImpl.SimpleMarkupKind

All Implemented Interfaces:
  java.lang.Comparable, IMarkupKind

Direct Known Subclasses:
  StealthMarkupKind

public class SimpleMarkupKind
extends java.lang.Object
implements IMarkupKind, java.lang.Comparable

Simple implementation of IMarkupKind. Will show in the Menu by default and can contain an image as well as a name. Also implements comparable and compares by name.

Constructor Summary
`SimpleMarkupKind(java.lang.String name)` Constructor
`SimpleMarkupKind(java.lang.String name, org.eclipse.swt.graphics.Image icon)` Constructor
`SimpleMarkupKind(java.lang.String name, java.lang.String tooltip)` Constructor
`SimpleMarkupKind(java.lang.String name, java.lang.String tooltip, org.eclipse.swt.graphics.Image icon)` Constructor

Method Summary
`int` | `compareTo(java.lang.Object object)`
`boolean` | `equals(java.lang.Object object)` Override the equals method to compare based on fields
`java.lang.String` | `getFullName()` Get the fullName
`org.eclipse.swt.graphics.Image` | `getIcon()` Get the icon for this kind.
`java.lang.String` | `getName()` Get the name of this kind.
`int` | `hashCode()` Override hashCode because we have overriden the equals method.
`boolean` | `showInMenu()` Ask whether or not to show this kind in the Visualiser Menu.
`java.lang.String` | `toString()` Get the String representation of this kind.

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleMarkupKind

    public SimpleMarkupKind(java.lang.String name)

  Constructor

Parameters:
  `name` - - name of the kind

### SimpleMarkupKind

    public SimpleMarkupKind(java.lang.String name,
                            org.eclipse.swt.graphics.Image icon)

  Constructor

Parameters:
  `name` - - name of the kind
  `icon` - - image

### SimpleMarkupKind

    public SimpleMarkupKind(java.lang.String name,
                            java.lang.String tooltip)

  Constructor

Parameters:
  `name` - - name of the kind

### SimpleMarkupKind

    public SimpleMarkupKind(java.lang.String name,
                            java.lang.String tooltip,
                            org.eclipse.swt.graphics.Image icon)

  Constructor

Parameters:
  `name` - - name of the kind
  `icon` - - image

Method Detail

### getName

    public java.lang.String getName()

  Get the name of this kind.

  Specified by:
    `getName` in interface `IMarkupKind`
  Returns:
    markup kind name
  See Also:
    `IMarkupKind.getName()`

### getIcon

    public org.eclipse.swt.graphics.Image getIcon()

  Get the icon for this kind.

  Specified by:
    `getIcon` in interface `IMarkupKind`
  Returns:
    markup kind image
  See Also:
    `IMarkupKind.getIcon()`

### showInMenu

    public boolean showInMenu()

  Ask whether or not to show this kind in the Visualiser Menu.

  Specified by:
    `showInMenu` in interface `IMarkupKind`
  Returns:
    true if kind should be shown
  See Also:
    `IMarkupKind.showInMenu()`

### compareTo

    public int compareTo(java.lang.Object object)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`
  See Also:
    `Comparable.compareTo(java.lang.Object)`

### equals

    public boolean equals(java.lang.Object object)

  Override the equals method to compare based on fields

### hashCode

    public int hashCode()

  Override hashCode because we have overriden the equals method.

### toString

    public java.lang.String toString()

  Get the String representation of this kind. Returns the name.

### getFullName

    public java.lang.String getFullName()

  Get the fullName

  Specified by:
    `getFullName` in interface `IMarkupKind`
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD