當前位置: 首頁>>代碼示例>>Java>>正文


Java HierarchyEvent.getSource方法代碼示例

本文整理匯總了Java中java.awt.event.HierarchyEvent.getSource方法的典型用法代碼示例。如果您正苦於以下問題:Java HierarchyEvent.getSource方法的具體用法?Java HierarchyEvent.getSource怎麽用?Java HierarchyEvent.getSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.event.HierarchyEvent的用法示例。


在下文中一共展示了HierarchyEvent.getSource方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: hierarchyChanged

import java.awt.event.HierarchyEvent; //導入方法依賴的package包/類
public void hierarchyChanged(HierarchyEvent e) {
	JComponent jc = (JComponent)e.getSource();
	JRootPane realRootPane = jc.getRootPane();
	Object recordedRootPane = rootPanes.get(jc);
	if(recordedRootPane==NULL_VALUE) recordedRootPane = null;
	if(realRootPane!=recordedRootPane) {
		Object value = realRootPane;
		if(value==null) value = NULL_VALUE;
		rootPanes.put(jc, value);
		rootPaneChanged(jc, realRootPane);
	}
}
 
開發者ID:mickleness,項目名稱:pumpernickel,代碼行數:13,代碼來源:RootPaneListener.java

示例2: hierarchyChanged

import java.awt.event.HierarchyEvent; //導入方法依賴的package包/類
public void hierarchyChanged(HierarchyEvent e) {
    JComponent c = (JComponent) e.getSource();
    if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0
            && !c.isDisplayable() && autoScroll) {
        scroller.stop();
    }
}
 
開發者ID:Emd4600,項目名稱:SporeModder,代碼行數:8,代碼來源:UIImagePanel.java

示例3: hierarchyChanged

import java.awt.event.HierarchyEvent; //導入方法依賴的package包/類
public void hierarchyChanged(HierarchyEvent e)
/* 217:    */     {
/* 218:400 */       if (((e.getChangeFlags() & 0x4) != 0L) && 
/* 219:401 */         ((e.getSource() instanceof Window)))
/* 220:    */       {
/* 221:402 */         Window secondaryWindow = (Window)e.getSource();
/* 222:403 */         if (!secondaryWindow.isShowing()) {
/* 223:404 */           SingleFrameApplication.this.saveSession(secondaryWindow);
/* 224:    */         }
/* 225:    */       }
/* 226:    */     }
 
開發者ID:xiwc,項目名稱:confluence.keygen,代碼行數:12,代碼來源:SingleFrameApplication.java

示例4: hierarchyChanged

import java.awt.event.HierarchyEvent; //導入方法依賴的package包/類
/**
 * <p>Keeps track of the current card</p>
 *
 * @param e The event
 */
@Override
public void hierarchyChanged(HierarchyEvent e) {
    JComponent component = (JComponent) e.getSource();

    if ((HierarchyEvent.SHOWING_CHANGED & e.getChangeFlags()) != 0
            && component.isShowing()) {
        currentCard = component;

    }
}
 
開發者ID:bither,項目名稱:bither-desktop-java,代碼行數:16,代碼來源:WizardCardLayout.java

示例5: hierarchyChanged

import java.awt.event.HierarchyEvent; //導入方法依賴的package包/類
public void hierarchyChanged(HierarchyEvent evt) {
    // only work with DockingPorts
    if(!(evt.getSource() instanceof DockingPort))
        return;

    // we don't want to work with sub-ports
    DockingPort port = (DockingPort)evt.getSource();
    if(!port.isRoot())
        return;

    // only work with parent-change events
    if(!isParentChange(evt))
        return;

    // root-ports are tracked by window.  if we can't find a parent window, then we
    // can track the dockingport.
    Container changedParent = evt.getChangedParent();
    RootWindow window = RootWindow.getRootContainer(changedParent);
    if(window==null)
        return;

    boolean removal = isRemoval(evt);
    if(removal)
        dockingPortRemoved(window, port);
    else
        dockingPortAdded(window, port);
}
 
開發者ID:humphrej,項目名稱:flexdock,代碼行數:28,代碼來源:DockingPortTracker.java


注:本文中的java.awt.event.HierarchyEvent.getSource方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。