java.awt.event.HierarchyBoundsListener#javax.swing.event.AncestorEvent源码实例Demo

下面列出了java.awt.event.HierarchyBoundsListener#javax.swing.event.AncestorEvent 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: leetcode-editor   文件: UpdatePluginListener.java
@Override
public void ancestorAdded(AncestorEvent event) {
    Config config = PersistentConfig.getInstance().getInitConfig();
    if (config == null) {
        return;
    } else {
        //如果存在历史版本,并且为2版本之前,则复制历史数据到新缓存目录下,并且更新版本号
        if (Constant.PLUGIN_CONFIG_VERSION_1.equals(config.getVersion()) || config.getVersion() == null) {
            File oldFile = new File(config.getFilePath() + File.separator + PersistentConfig.OLDPATH + File.separator);
            if (oldFile.getParentFile().exists()) {
                File newFile = new File(config.getFilePath() + File.separator + PersistentConfig.PATH + File.separator);
                if (!newFile.getParentFile().exists()) {
                    newFile.getParentFile().mkdirs();
                }
                try {
                    FileUtils.copyDirectory(oldFile, newFile);
                } catch (IOException e) {

                }
            }
            config.setVersion(Constant.PLUGIN_CONFIG_VERSION_2);
            PersistentConfig.getInstance().setInitConfig(config);
        }
    }

}
 
源代码2 项目: netbeans   文件: DiffResultsView.java
@Override
public void ancestorAdded(AncestorEvent event) {
    ExplorerManager em = ExplorerManager.find(treeView);
    em.addPropertyChangeListener(this);
    if (dividerSet) {
        if (lastDividerLoc != 0) {
            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run () {
                    diffView.setDividerLocation(lastDividerLoc);
                }
            });
        }
    } else {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                dividerSet = true;
                diffView.setDividerLocation(0.33);
            }
        });
    }
}
 
源代码3 项目: netbeans   文件: DiffResultsView.java
@Override
public void ancestorAdded(AncestorEvent event) {
    ExplorerManager em = ExplorerManager.find(treeView);
    em.addPropertyChangeListener(this);
    if (dividerSet) {
        if (lastDividerLoc != 0) {
            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run () {
                    diffView.setDividerLocation(lastDividerLoc);
                }
            });
        }
    } else {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                dividerSet = true;
                diffView.setDividerLocation(0.33);
            }
        });
    }
}
 
源代码4 项目: weblaf   文件: AncestorAdapter.java
@Override
public void ancestorAdded ( final AncestorEvent event )
{
    /**
     * Do nothing by default.
     */
}
 
源代码5 项目: Logisim   文件: About.java
@Override
public void ancestorAdded(AncestorEvent arg0) {
	if (thread == null) {
		thread = new PanelThread(this);
		thread.start();
	}
}
 
源代码6 项目: consulo   文件: EventLogToolWindowFactory.java
@Override
public void ancestorAdded(AncestorEvent event) {
  ToolWindow log = EventLog.getEventLog(myProject);
  if (log != null && log.isVisible()) {
    EventLog.getLogModel(myProject).logShown();
  }
}
 
源代码7 项目: weblaf   文件: AncestorAdapter.java
@Override
public void ancestorMoved ( final AncestorEvent event )
{
    /**
     * Do nothing by default.
     */
}
 
@Override
public void ancestorAdded(AncestorEvent event) {
    ToolWindow log = ConsoleLog.getLogWindow(myProject);
    if (log != null && log.isVisible()) {
        ConsoleLogModel model = ConsoleLog.getLogModel(myProject);
        if(model != null) {
            model.logShown();
        }
    }
}
 
源代码9 项目: Spark   文件: RequestFocusListener.java
@Override
public void ancestorAdded(AncestorEvent e) {
    JComponent component = e.getComponent();
    component.requestFocusInWindow();

    if (removeListener)
        component.removeAncestorListener( this );
}
 
源代码10 项目: netbeans   文件: EditorRegistry.java
@Override
public void ancestorAdded(AncestorEvent event) {
    Item item = item(event.getComponent());
    if (item.runningTimer != null) {
        item.runningTimer.stop();
        item.runningTimer = null;
    }
    itemMadeDisplayable(item);
}
 
源代码11 项目: weblaf   文件: WebFileBreadcrumb.java
private void installTip ( final File file, final JComponent component, final boolean showFullName )
{
    final WebPanel panel = new WebPanel ( new VerticalFlowLayout ( 4, 4 ) );
    panel.setOpaque ( false );

    if ( showFullName )
    {
        // Full file name
        panel.add ( new WebLabel ( FileUtils.getDisplayFileName ( file ), FileUtils.getFileIcon ( file ) ) );
        panel.add ( new WebSeparator ( WebSeparator.HORIZONTAL ) );
    }

    // File description
    panel.add ( new WebLabel ( FileUtils.getFileTypeDescription ( file ), typeIcon ) );

    if ( FileUtils.isFile ( file ) )
    {
        // File modification date
        panel.add ( new WebLabel ( FileUtils.getDisplayFileModificationDate ( file ), dateIcon ) );

        // File size
        panel.add ( new WebLabel ( FileUtils.getDisplayFileSize ( file ), sizeIcon ) );
    }

    // Registering tooltip
    TooltipManager.setTooltip ( component, panel );

    // Removing tooltip when component is removed
    component.addAncestorListener ( new AncestorAdapter ()
    {
        @Override
        public void ancestorRemoved ( final AncestorEvent event )
        {
            TooltipManager.removeTooltips ( component );
        }
    } );
}
 
源代码12 项目: weblaf   文件: AbstractHoverBehavior.java
@Override
public void ancestorMoved ( @NotNull final AncestorEvent event )
{
    /**
     * Updating hover properly upon component ancestor updates.
     */
    updateHover ();
}
 
源代码13 项目: weblaf   文件: AbstractHoverBehavior.java
@Override
public void ancestorRemoved ( @NotNull final AncestorEvent event )
{
    /**
     * No extra updates required on this event.
     */
}
 
源代码14 项目: netbeans   文件: FileTreeView.java
@Override
public void ancestorAdded(AncestorEvent event) {
    if (!displayed) {
        displayed = true;
        setDefaultColumnSizes();
    }
}
 
源代码15 项目: visualvm   文件: BarChart.java
public void ancestorMoved(AncestorEvent event) {
}
 
源代码16 项目: darklaf   文件: AncestorAdapter.java
@Override
public void ancestorMoved(final AncestorEvent event) {}
 
源代码17 项目: netbeans   文件: PropertiesTable.java
public void ancestorMoved(AncestorEvent arg0) {
}
 
源代码18 项目: java-swing-tips   文件: MainPanel.java
@Override public void ancestorMoved(AncestorEvent e) {
  /* not needed */
}
 
源代码19 项目: darklaf   文件: TabFrameContentPane.java
public TabFrameContentPane() {
    super(new BorderLayout());
    cont.setBackground(Color.YELLOW);

    PopupContainer leftBottomPanel = new PopupContainer();
    PopupContainer rightTopPanel = new PopupContainer();
    PopupContainer rightBottomPanel = new PopupContainer();
    PopupContainer topLeftPanel = new PopupContainer();
    PopupContainer topRightPanel = new PopupContainer();
    PopupContainer bottomLeftPanel = new PopupContainer();
    PopupContainer bottomRightPanel = new PopupContainer();
    PopupContainer leftTopPanel = new PopupContainer();

    rightSplitter = createSplitPane("rightSplitter");
    rightSplitter.setOrientation(JSplitPane.VERTICAL_SPLIT);
    rightSplitter.setTopComponent(rightTopPanel);
    rightSplitter.setBottomComponent(rightBottomPanel);

    leftSplitter = createSplitPane("leftSplitter");
    leftSplitter.setOrientation(JSplitPane.VERTICAL_SPLIT);
    leftSplitter.setTopComponent(leftTopPanel);
    leftSplitter.setBottomComponent(leftBottomPanel);

    topSplitter = createSplitPane("topSplitter");
    topSplitter.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    topSplitter.setLeftComponent(topLeftPanel);
    topSplitter.setRightComponent(topRightPanel);

    bottomSplitter = createSplitPane("bottomSplitter");
    bottomSplitter.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    bottomSplitter.setLeftComponent(bottomLeftPanel);
    bottomSplitter.setRightComponent(bottomRightPanel);

    topSplit = createSplitPane("topSplit");
    bottomSplit = createSplitPane("bottomSplit");
    topSplit.setOrientation(JSplitPane.VERTICAL_SPLIT);
    bottomSplit.setOrientation(JSplitPane.VERTICAL_SPLIT);

    topSplit.setTopComponent(topSplitter);
    topSplit.setBottomComponent(bottomSplit);
    bottomSplit.setBottomComponent(bottomSplitter);

    leftSplit = createSplitPane("leftSplit");
    rightSplit = createSplitPane("rightSplit");
    leftSplit.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    rightSplit.setOrientation(JSplitPane.HORIZONTAL_SPLIT);

    bottomSplit.setTopComponent(leftSplit);
    leftSplit.setLeftComponent(leftSplitter);
    leftSplit.setRightComponent(rightSplit);
    rightSplit.setRightComponent(rightSplitter);
    rightSplit.setLeftComponent(cont);

    topSplit.setResizeWeight(0.0d);
    leftSplit.setResizeWeight(0.0d);
    bottomSplit.setResizeWeight(1.0d);
    rightSplit.setResizeWeight(1.0d);
    setupSplitterPanes(JSplitPane::setResizeWeight, 0.5d);

    setupSplitPanes(JSplitPane::setEnabled, false);
    setupSplitPanes(ToggleSplitPane::setResizable, false);
    setupSplitterPanes(JSplitPane::setEnabled, false);
    setupSplitterPanes(ToggleSplitPane::setResizable, false);

    add(topSplit, BorderLayout.CENTER);

    addAncestorListener(new AncestorAdapter() {
        @Override
        public void ancestorAdded(final AncestorEvent event) {
            removeAncestorListener(this);
            SwingUtilities.invokeLater(() -> init());
        }
    });
}
 
源代码20 项目: java-swing-tips   文件: MainPanel.java
@Override public void ancestorAdded(AncestorEvent e) {
  e.getComponent().requestFocusInWindow();
}
 
源代码21 项目: java-swing-tips   文件: MainPanel.java
@Override public void ancestorAdded(AncestorEvent e) {
  e.getComponent().requestFocusInWindow();
}
 
源代码22 项目: pumpernickel   文件: TextHighlightSheet.java
public void ancestorRemoved(AncestorEvent event) {
	makeHighlightsDirty();
}
 
源代码23 项目: netbeans   文件: CheckBoxUpdater.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
 
源代码24 项目: netbeans   文件: ComboBoxUpdater.java
@Override
public void ancestorAdded(AncestorEvent event) {
    setComboValue(getValue(), getDefaultValue(), component);
    component.addActionListener(this);
}
 
源代码25 项目: netbeans   文件: ComboBoxUpdater.java
@Override
public void ancestorMoved(AncestorEvent event) {
}
 
源代码26 项目: Spark   文件: RequestFocusListener.java
@Override
public void ancestorRemoved(AncestorEvent e) {}
 
源代码27 项目: netbeans   文件: TextComponentUpdater.java
@Override
public void ancestorRemoved(AncestorEvent event) {
    component.getDocument().removeDocumentListener(this);
}
 
源代码28 项目: orbit-image-analysis   文件: Loupe.java
public void ancestorAdded(AncestorEvent event) {
}
 
源代码29 项目: netbeans   文件: AddDependencyPanel.java
@Override
public void ancestorAdded(AncestorEvent event) {
    loadArtifacts();
}
 
源代码30 项目: pumpernickel   文件: AbstractSearchHighlight.java
public void ancestorAdded(AncestorEvent event) {
}