Class TabEditPart

java.lang.Object
org.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
All Implemented Interfaces:
IAdaptable, org.eclipse.gef.EditPart, org.eclipse.gef.GraphicalEditPart, org.eclipse.gef.NodeEditPart, org.eclipse.gef.RequestConstants

public class TabEditPart extends AbstractContainerEditpart
The editpart of tab widget.
  • Constructor Details

    • TabEditPart

      public TabEditPart()
  • Method Details

    • createGroupingContainer

      public static GroupingContainerModel createGroupingContainer()
    • activate

      public void activate()
      Specified by:
      activate in interface org.eclipse.gef.EditPart
      Overrides:
      activate in class AbstractBaseEditPart
    • addTab

      public void addTab()
    • addTab

      public void addTab(int index, TabItem tabItem)
      Add a TabItem to the index;
      Parameters:
      index -
      tabItem -
    • createChild

      protected final org.eclipse.gef.EditPart createChild(Object model)
      Overrides:
      createChild in class org.eclipse.gef.editparts.AbstractEditPart
    • createEditPolicies

      protected void createEditPolicies()
      Overrides:
      createEditPolicies in class AbstractContainerEditpart
    • deactivate

      public void deactivate()
      Specified by:
      deactivate in interface org.eclipse.gef.EditPart
      Overrides:
      deactivate in class AbstractContainerEditpart
    • doCreateFigure

      protected org.eclipse.draw2d.IFigure doCreateFigure()
      Description copied from class: AbstractBaseEditPart
      Create and initialize the widget figure with the property values in model.
      Specified by:
      doCreateFigure in class AbstractBaseEditPart
      Returns:
      the widget figure
    • getActiveTabIndex

      public int getActiveTabIndex()
      Get the index of the active tab.
      Returns:
      the index of the active tab. Index starts from 0.
    • getContentPane

      public org.eclipse.draw2d.IFigure getContentPane()
      Specified by:
      getContentPane in interface org.eclipse.gef.GraphicalEditPart
      Overrides:
      getContentPane in class org.eclipse.gef.editparts.AbstractGraphicalEditPart
    • getGroupingContainer

      public GroupingContainerModel getGroupingContainer(int index)
    • getTabItem

      public TabItem getTabItem(int tabIndex)
    • getTabItemCount

      public int getTabItemCount()
    • getTabLabel

      public org.eclipse.draw2d.Label getTabLabel(int index)
    • getWidgetModel

      public TabModel getWidgetModel()
      Overrides:
      getWidgetModel in class AbstractContainerEditpart
    • registerPropertyChangeHandlers

      protected void registerPropertyChangeHandlers()
      Description copied from class: AbstractBaseEditPart
      Register the property change handlers. Subclass should register its property change handlers in this method.
      Specified by:
      registerPropertyChangeHandlers in class AbstractBaseEditPart
    • removeTab

      public void removeTab()
    • removeTab

      public void removeTab(int index)
    • setActiveTabIndex

      public void setActiveTabIndex(int index)
      Show tab in this index.
      Parameters:
      index - the index of the tab to be shown. Index starts from 0.