org.eclipse.datatools.sqltools.schemaobjecteditor.ui.common
Class CompositeEditSection

java.lang.Object
  extended by org.eclipse.ui.forms.AbstractFormPart
      extended by org.eclipse.datatools.sqltools.schemaobjecteditor.ui.common.CollapseableSection
          extended by org.eclipse.datatools.sqltools.schemaobjecteditor.ui.common.CompositeEditSection
All Implemented Interfaces:
org.eclipse.ui.forms.IFormPart
Direct Known Subclasses:
ListSchemaObjectsSection, SQLConstraintsBlock.ConstraintsSection

public class CompositeEditSection
extends CollapseableSection

A composite edit section, with a main control area and a button list.
User of this class can create any widgets on the main control area, for example, viewer.

Author:
Idull

Field Summary
static int BUTTON_WIDTH
           
 
Constructor Summary
CompositeEditSection(org.eclipse.ui.forms.widgets.FormToolkit toolkit, java.lang.String title, org.eclipse.swt.widgets.Display display, boolean isCollapseable, boolean isCollapsed, int estyle, java.lang.String[] buttonTexts, int buttonWidth)
          Constructs a composite edit section
CompositeEditSection(org.eclipse.ui.forms.widgets.FormToolkit toolkit, java.lang.String title, org.eclipse.swt.widgets.Display display, boolean isCollapseable, boolean isCollapsed, int estyle, java.lang.String[] buttonTexts, int buttonWidth, java.lang.String despText)
          Constructs a composite edit section
 
Method Summary
 void enableButton(boolean enable, int buttonIndex)
           
 org.eclipse.swt.widgets.Composite getButtonComp()
           
 org.eclipse.swt.widgets.Button[] getButtons()
          Returns the button list
 org.eclipse.swt.widgets.Composite getLeftComposite()
           
 boolean isButtonEnabled(boolean enable, int buttonIndex)
           
 
Methods inherited from class org.eclipse.datatools.sqltools.schemaobjecteditor.ui.common.CollapseableSection
createControl, getSection, getSectionContent, setPluginId
 
Methods inherited from class org.eclipse.ui.forms.AbstractFormPart
commit, dispose, getManagedForm, initialize, isDirty, isStale, markDirty, markStale, refresh, setFocus, setFormInput
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUTTON_WIDTH

public static final int BUTTON_WIDTH
See Also:
Constant Field Values
Constructor Detail

CompositeEditSection

public CompositeEditSection(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                            java.lang.String title,
                            org.eclipse.swt.widgets.Display display,
                            boolean isCollapseable,
                            boolean isCollapsed,
                            int estyle,
                            java.lang.String[] buttonTexts,
                            int buttonWidth)
Constructs a composite edit section

Parameters:
toolkit - the form toolkit
title - the title of this section
display - the Display instance
isCollapseable - whether the section is collapseable or not
isCollapsed - the initial collapse status of the section
estyle - the style of the section
buttonTexts - the button texts
buttonWidth - the button width

CompositeEditSection

public CompositeEditSection(org.eclipse.ui.forms.widgets.FormToolkit toolkit,
                            java.lang.String title,
                            org.eclipse.swt.widgets.Display display,
                            boolean isCollapseable,
                            boolean isCollapsed,
                            int estyle,
                            java.lang.String[] buttonTexts,
                            int buttonWidth,
                            java.lang.String despText)
Constructs a composite edit section

Parameters:
toolkit - the form toolkit
title - the title of this section
display - the Display instance
isCollapseable - whether the section is collapseable or not
isCollapsed - the initial collapse status of the section
estyle - the style of the section
buttonTexts - the button texts
buttonWidth - the button width
despText - the description text of the section
Method Detail

getLeftComposite

public org.eclipse.swt.widgets.Composite getLeftComposite()

getButtons

public org.eclipse.swt.widgets.Button[] getButtons()
Returns the button list

Returns:

getButtonComp

public org.eclipse.swt.widgets.Composite getButtonComp()

enableButton

public void enableButton(boolean enable,
                         int buttonIndex)

isButtonEnabled

public boolean isButtonEnabled(boolean enable,
                               int buttonIndex)