当前位置: 首页>>代码示例>>Java>>正文


Java PageComponent类代码示例

本文整理汇总了Java中org.springframework.richclient.application.PageComponent的典型用法代码示例。如果您正苦于以下问题:Java PageComponent类的具体用法?Java PageComponent怎么用?Java PageComponent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PageComponent类属于org.springframework.richclient.application包,在下文中一共展示了PageComponent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NewBagInPlaceFrame

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
 * NewBagInPlaceFrame.
 *
 * @param bagView BagView
 * @param title   String
 */
public NewBagInPlaceFrame(final BagView bagView, final String title) {
    super(title);
    final Application app = Application.instance();
    final ApplicationPage page = app.getActiveWindow().getPage();
    final PageComponent component = page.getActiveComponent();
    if (component != null) {
        this.bagView = ApplicationContextUtil.getBagView();
    } else {
        this.bagView = bagView;
    }
    if (bagView != null) {
        bag = bagView.getBag();
        getContentPane().removeAll();
        createPanel = createComponents();
    } else {
        createPanel = new JPanel();
    }
    getContentPane().add(createPanel, BorderLayout.CENTER);
    final Dimension preferredDimension = new Dimension(400, 230);
    setPreferredSize(preferredDimension);
    setLocation(200, 100);
    pack();
}
 
开发者ID:pan-dora,项目名称:modeller,代码行数:30,代码来源:NewBagInPlaceFrame.java

示例2: NewBagFrame

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
 * NewBagFrame.
 *
 * @param bagView BagView
 * @param title   String
 */
public NewBagFrame(final BagView bagView, final String title) {
    super(title);
    final JPanel createPanel;
    final Application app = Application.instance();
    final ApplicationPage page = app.getActiveWindow().getPage();
    final PageComponent component = page.getActiveComponent();

    if (component != null) {
        this.bagView = ApplicationContextUtil.getBagView();
    } else {
        this.bagView = bagView;
    }
    if (bagView != null) {
        getContentPane().removeAll();
        createPanel = createComponents();
    } else {
        createPanel = new JPanel();
    }
    getContentPane().add(createPanel, BorderLayout.CENTER);

    setPreferredSize(new Dimension(400, 200));
    setLocation(300, 200);
    pack();
}
 
开发者ID:pan-dora,项目名称:modeller,代码行数:31,代码来源:NewBagFrame.java

示例3: setActiveComponent

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
 * Activates the given <code>PageComponent</code>. Does nothing if it is already the active one.
 * <p>
 * Does nothing if this <code>ApplicationPage</code> doesn't contain the given <code>PageComponent</code>.
 * 
 * @param pageComponent
 *            the <code>PageComponent</code>
 */
public void setActiveComponent(PageComponent pageComponent) {
    if (!pageComponents.contains(pageComponent)) {
        return;
    }

    // if pageComponent is already active, don't do anything
    if (this.activeComponent == pageComponent || settingActiveComponent) {
        return;
    }

    settingActiveComponent = true;
    try {
        if (this.activeComponent != null) {
            fireFocusLost(this.activeComponent);
        }
        giveFocusTo(pageComponent);
        this.activeComponent = pageComponent;
        fireFocusGained(this.activeComponent);
    } finally {
        // If this is not done in a finally, any exception thrown in fireFocusGained
        // will prevent the user from leaving the screen
        settingActiveComponent = false;
    }
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:33,代码来源:AbstractApplicationPage.java

示例4: createView

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected View createView( final PageComponent component ) {
    View view = new View( component.getId() );
    view.setTitle( component.getDisplayName() );
    view.setTabText( component.getDisplayName() );
    view.setTabIcon( component.getIcon() );
    view.setIcon( component.getIcon() );
    view.setContentPane( component.getControl() );

    view.getViewProperties().addPropertyChangeListener( activeHandler );

    configureView( component, view, getViewDescriptor( component.getId() ) );

    dockables.put( component.getId(), view );

    return view;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:17,代码来源:FlexDockApplicationPage.java

示例5: giveFocusTo

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected boolean giveFocusTo( final PageComponent pageComponent ) {
    if( creatingDockable ) {
        return false;
    }

    View view = getFlexView( pageComponent.getId() );

    view.setActive( true );

    // HACK: otherwise the first dockable that was active will still be active
    for( Iterator iter = DockingManager.getDockableIds().iterator(); iter.hasNext(); ) {
        String id = (String) iter.next();
        if( !id.equals( pageComponent.getId() ) ) {
            getFlexView( id ).setActive( false );
        }
    }

    return true;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:20,代码来源:FlexDockApplicationPage.java

示例6: selectionChanged

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
public void selectionChanged(DockableSelectionEvent e) {
    Dockable dockable = e.getSelectedDockable();
    if (dockable != null) {
        PageComponent pc = getPageComponent(dockable);
        if (pc != null)
            setActiveComponent(pc);
    }
}
 
开发者ID:danilovalente,项目名称:spring-richclient,代码行数:9,代码来源:VLDockingApplicationPage.java

示例7: doRemovePageComponent

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
* {@inheritDoc}
* 
* Only one pageComponent is shown at a time, so if it's the active one,
* remove all components from this page.
*/
  protected void doRemovePageComponent( PageComponent pageComponent ) {
      if (pageComponent == getActiveComponent())
      {
   	this.control.removeAll();
       this.control.validate();
       this.control.repaint();
      }
  }
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:15,代码来源:DefaultApplicationPage.java

示例8: updatePageComponentProperties

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected void updatePageComponentProperties(PageComponent pageComponent) {
    Dockable dockable = getDockable(pageComponent);
    DockKey dockKey = dockable.getDockKey();

    if (pageComponent.getIcon() != null) {
        dockKey.setIcon(pageComponent.getIcon());
    }
    dockKey.setName(pageComponent.getDisplayName());
    dockKey.setTooltip(pageComponent.getCaption());
}
 
开发者ID:danilovalente,项目名称:spring-richclient,代码行数:11,代码来源:VLDockingApplicationPage.java

示例9: componentFocusGained

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
public void componentFocusGained(PageComponent component) {
    super.componentFocusGained(component);
    PageComponentContext context = component.getContext();
    for (Iterator i = window.getSharedCommands(); i.hasNext();) {
        TargetableActionCommand globalCommand = (TargetableActionCommand)i.next();
        globalCommand.setCommandExecutor(context.getLocalCommandExecutor(globalCommand.getId()));
    }
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:9,代码来源:SharedCommandTargeter.java

示例10: updatePageComponentProperties

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected void updatePageComponentProperties(PageComponent pageComponent) {
    int index = indexOf(pageComponent);

    tabbedPane.setIconAt(index, pageComponent.getIcon());
    tabbedPane.setTitleAt(index, pageComponent.getDisplayName());
    tabbedPane.setToolTipTextAt(index, pageComponent.getCaption());
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:8,代码来源:TabbedApplicationPage.java

示例11: doAddPageComponent

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected void doAddPageComponent(PageComponent pageComponent) {
    try {
        addingComponent = true;
        tabbedPane.addTab(pageComponent.getDisplayName(), pageComponent.getIcon(), pageComponent.getContext()
                .getPane().getPageComponent().getControl(), pageComponent.getCaption());
    } finally {
        addingComponent = false;
    }
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:10,代码来源:TabbedApplicationPage.java

示例12: dispose

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
 * Overridden close method to avoid memory leaks by Mikael Valot
 */
public void dispose(){
	Collection pageComponents = new ArrayList(pageComponentMap.values());
	Iterator it = pageComponents.iterator();
	while(it.hasNext()){
		PageComponent pageComponent = (PageComponent)it.next();
		remove(pageComponent);
	}
	contentPane.dispose();
	contentPane = null;
	super.dispose();
}
 
开发者ID:danilovalente,项目名称:spring-richclient,代码行数:15,代码来源:WorkspaceView.java

示例13: resolveDockable

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
public Dockable resolveDockable(String keyName) {
    ViewDescriptor descriptor = getViewDescriptor(keyName);
    if (descriptor == null)
        return null;
    PageComponent pageComponent = createPageComponent(descriptor);
    resolving = true;
    addPageComponent(pageComponent);
    resolving = false;
    Dockable dockable = createDockable(descriptor, pageComponent);
    return dockable;
}
 
开发者ID:danilovalente,项目名称:spring-richclient,代码行数:12,代码来源:VLDockingApplicationPage.java

示例14: findPageComponent

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
protected PageComponent findPageComponent(final String viewDescriptorId) {
    for (PageComponent component : pageComponents) {
        if (component.getId().equals(viewDescriptorId)) {
            return component;
        }
    }

    return null;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:10,代码来源:AbstractApplicationPage.java

示例15: addPageComponent

import org.springframework.richclient.application.PageComponent; //导入依赖的package包/类
/**
 * Adds the pageComponent to the components list while registering listeners and firing appropriate events. (not yet
 * setting the component as the active one)
 * 
 * @param pageComponent
 *            the pageComponent to add.
 */
protected void addPageComponent(PageComponent pageComponent) {
    pageComponents.add(pageComponent);
    doAddPageComponent(pageComponent);
    pageComponent.addPropertyChangeListener(pageComponentUpdater);

    fireOpened(pageComponent);
}
 
开发者ID:danilovalente,项目名称:spring-richclient,代码行数:15,代码来源:AbstractApplicationPage.java


注:本文中的org.springframework.richclient.application.PageComponent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。