类org.eclipse.ui.forms.SectionPart源码实例Demo

下面列出了怎么用org.eclipse.ui.forms.SectionPart的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: tlaplus   文件: DataBindingManager.java
/**
 * enables a section by given id. More precisely, this
 * means setting the enablement state of any child of the
 * section that is a {@link Composite} but not a {@link Section}
 * to enabled.
 */
private void enableSection(String id, boolean enabled)
{
    SectionPart part = sectionParts.get(id);
    if (part == null)
    {
        throw new IllegalArgumentException("No section for id [" + id + "]");
    }
    Section section = part.getSection();
    Control[] children = section.getChildren();
    for (int i = 0; i < children.length; i++)
    {

        if (children[i] instanceof Composite)
        {
            enableSectionComposite((Composite) children[i], enabled);
        }
    }
}
 
源代码2 项目: tlaplus   文件: DataBindingManager.java
/**
 * Adds a section to the manager
 * @param section
 * @param id
 * @param pageId
 */
public void bindSection(SectionPart sectionPart, String id, String pageId)
{
    // store the section
    sectionParts.put(id, sectionPart);

    // store the page id
    pageForSection.put(id, pageId);

    Vector<String> sectionIds = sectionsForPage.get(pageId);
    if (sectionIds == null)
    {
        sectionIds = new Vector<String>();
        sectionsForPage.put(pageId, sectionIds);
    }

    sectionIds.add(id);
}
 
源代码3 项目: tlaplus   文件: DataBindingManager.java
/**
 * Bind an attribute name <code>attributeName</code> to the viewer <code>attributeViewer</code> location in the section part <code>sectionPart</code>
 * This method should be called after the section is bound to the section id and page using {@link DataBindingManager#bindSection(SectionPart, String, String)} method
 * @param attributeName
 * @param attributeViewer
 * @param sectionPart
 */
public void bindAttribute(String attributeName, Object attributeViewer, SectionPart sectionPart)
{
    // bind the viewer
    viewerForAttribute.put(attributeName, attributeViewer);
    // bind the section id
    Enumeration<String> enumeration = sectionParts.keys();
    while (enumeration.hasMoreElements())
    {
        String sectionId = enumeration.nextElement();
        SectionPart registeredPart = sectionParts.get(sectionId);
        if (registeredPart.equals(sectionPart))
        {
            sectionForAttribute.put(attributeName, sectionId);
            break;
        }
    }
}
 
源代码4 项目: tlaplus   文件: DataBindingManager.java
/** 
 * expands a section by given section id
 */
public void expandSection(String id)
{
    SectionPart part = sectionParts.get(id);
    if (part == null)
    {
        throw new IllegalArgumentException("No section for id");
    }
    if (!part.getSection().isExpanded())
    {
        part.getSection().setExpanded(true);
    }
}
 
源代码5 项目: uima-uimaj   文件: AbstractSection.java
/**
 * Finish aggregate change action.
 */
protected void finishAggregateChangeAction() {

  editor.setFileDirty();
  editor.getTypePage().markStale();
  editor.getIndexesPage().markStale();
  editor.getCapabilityPage().markStale();
  SectionPart s = editor.getParameterPage().getParameterDelegatesSection();
  if (null != s)
    s.markStale();
  editor.getResourcesPage().markStale();
}
 
源代码6 项目: tlaplus   文件: DataBindingManager.java
/**
 * Retrieves the section by id
 * @param sectionId
 * @return the section part, or <code>null</code> if not found
 */
public SectionPart getSection(String sectionId)
{
    return (SectionPart) sectionParts.get(sectionId);
}
 
 类所在包
 类方法
 同包方法