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


Java TopComponent.requestActive方法代码示例

本文整理汇总了Java中org.openide.windows.TopComponent.requestActive方法的典型用法代码示例。如果您正苦于以下问题:Java TopComponent.requestActive方法的具体用法?Java TopComponent.requestActive怎么用?Java TopComponent.requestActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.windows.TopComponent的用法示例。


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

示例1: userClickedSlidingButton

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
/** Triggers slide operation by changing selected index */
@Override
public void userClickedSlidingButton(Component clickedButton) {
    int index = getButtonIndex(clickedButton);
    SlidingButton button = (SlidingButton) buttons.get(index);
    button.setBlinking(false);
    
    if (index != selModel.getSelectedIndex() || !isActive()) {
        TopComponent tc = (TopComponent)dataModel.getTab(index).getComponent();
        if (tc != null) {
            tc.requestActive();
        }
        button.setSelected( true );
    } else {
        selModel.setSelectedIndex(-1);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:SlideBar.java

示例2: actionPerformed

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
/** Opens component palette. */
public void actionPerformed(ActionEvent evt) {
    // show ComponentPalette
    TopComponent palette = WindowManager.getDefault().findTopComponent("CommonPalette"); // NOI18N
    if( null == palette ) {
        Logger.getLogger( getClass().getName() ).log( Level.INFO, "Cannot find CommonPalette component." ); // NOI18N
            
        return;
    }
    Utils.setOpenedByUser( palette, true );
    palette.open();
    palette.requestActive();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:ShowPaletteAction.java

示例3: splitWindow

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
static void splitWindow(TopComponent tc, int orientation, int splitLocation) {
if (tc instanceof Splitable) {
    TopComponent split = ((Splitable) tc).splitComponent(orientation, splitLocation);
    split.open();
    split.requestActive();
           split.invalidate();
           split.revalidate();
           split.repaint();
           split.requestFocusInWindow();
}
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:SplitAction.java

示例4: clearSplit

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
static void clearSplit(TopComponent tc, int elementToActivate) {
if (tc instanceof Splitable) {
    TopComponent original = ((Splitable) tc).clearSplit(elementToActivate);
    original.open();
    original.requestActive();
           original.invalidate();
           original.revalidate();
           original.repaint();
           original.requestFocusInWindow();
}
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:SplitAction.java

示例5: handleActivation

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
private void handleActivation(MouseEvent evt) {
    Object obj = evt.getSource();
    if (!(obj instanceof Component)) {
        return;
    }
    Component comp = (Component) obj;
    
    while (comp != null && !(comp instanceof ModeComponent)) {
        if (comp instanceof JComponent) {
            JComponent c = (JComponent)comp;
            // don't activate if requested
            if (Boolean.TRUE.equals(c.getClientProperty("dontActivate"))) { //NOI18N
                return;
            }
        }
        if (comp instanceof TopComponent) {
            TopComponent tc = (TopComponent)comp;
            // special way of activation for topcomponents in sliding mode
            if (Boolean.TRUE.equals(tc.getClientProperty("isSliding"))) { //NOI18N
                tc.requestActive();
                return;
            }
        }
        comp = comp.getParent();
    }

    if (comp instanceof ModeComponent) {
        ModeComponent modeComp = (ModeComponent)comp;
        // don't activate sliding views when user clicked edge bar
        if (modeComp.getKind() != Constants.MODE_KIND_SLIDING) {
            ModeView modeView = modeComp.getModeView();
            modeView.getController().userActivatedModeView(modeView);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:36,代码来源:TabbedHandler.java

示例6: returnFocus

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
private void returnFocus (boolean force) {
    displayer.setVisible(false);
    if (caller != null) {
        TopComponent tc = caller.get();
        if (tc != null) {
            tc.requestActive();
            tc.requestFocus();
            return;
        }
    }
    if (force) {
        KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:AbstractQuickSearchComboBar.java

示例7: openComponent

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
static TopComponent openComponent (String viewName, boolean activate) {
    TopComponent view = WindowManager.getDefault().findTopComponent(viewName);
    if (view == null) {
        throw new IllegalArgumentException(viewName);
    }
    view.open();
    if (activate) {
        view.requestActive();
    }
    return view;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ViewActions.java

示例8: action

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
@Override
public synchronized void action(ActionEvent e) {
    if (serverDef.getServerFlag().getFlag() != null) {
        TopComponent map = WindowManager.getDefault().findTopComponent(uid);
        if (map == null) {
            map = new PureMapTopComponent(serverDef);
            uid = WindowManager.getDefault().findTopComponentID(map);
        }
        map.open();
        map.requestActive();
    }
}
 
开发者ID:kefik,项目名称:Pogamut3,代码行数:13,代码来源:UnrealServerNode.java

示例9: run

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
@Override
public Void run() {
    assertTrue("Is EDT", EventQueue.isDispatchThread());
    TopComponent tc =new TopComponent();
    tc.open();
    tc.requestActive();
    return null;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:InitializeInAWTTest.java

示例10: actionPerformed

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
public void actionPerformed (ActionEvent evt) {
    Component focusOwner = FocusManager.getCurrentManager().getFocusOwner();
    // move focus away only from navigator AWT children,
    // but not combo box to preserve its ESC functionality
    if (lastActivatedRef == null ||
        focusOwner == null ||
        !SwingUtilities.isDescendingFrom(focusOwner, navigatorTC.getTopComponent()) ||
        focusOwner instanceof JComboBox) {
        return;
    }
    TopComponent prevFocusedTc = lastActivatedRef.get();
    if (prevFocusedTc != null) {
        prevFocusedTc.requestActive();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:NavigatorController.java

示例11: put

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
public Object put(String key, Object value) {
    if ("requestActive".equals(key)) {
        TopComponent tc = (TopComponent)value;
        tc.requestActive();
        return null;
    }
    
    throw new UnsupportedOperationException("Not supported yet.");
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:Calls.java

示例12: onMouseClick

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
/**
 * Invoked when the user clicks the icon.
 */
protected void onMouseClick() {
    TopComponent tc = WindowManager.getDefault().findTopComponent("NotificationCenterTopComponent");
    tc.open();
    tc.requestActive();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:FlashingIcon.java

示例13: actionPerformed

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent evt) {
    TopComponent win = FilterTopComponent.findInstance();
    win.open();
    win.requestActive();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:7,代码来源:FilterAction.java

示例14: showResults

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
public void showResults(URL url) {
    TopComponent topComponent = getReport(true);
    topComponent.open();
    topComponent.requestActive();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:StopwatchProfilingPoint.java

示例15: actionPerformed

import org.openide.windows.TopComponent; //导入方法依赖的package包/类
@Override
public void actionPerformed(ActionEvent evt) {
    TopComponent win = BytecodeViewTopComponent.findInstance();
    win.open();
    win.requestActive();
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:7,代码来源:BytecodeViewAction.java


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