public void componentAdded(ContainerEvent e) {
if (e.getChild() instanceof JTextComponent) {
e.getChild().addFocusListener(this);
viewportViewHasFocus = e.getChild().isFocusOwner();
scrollpane.repaint();
}
}
java类java.awt.event.ContainerEvent的实例源码
SynthScrollPaneUI.java 文件源码
项目:openjdk9
阅读 29
收藏 0
点赞 0
评论 0
SynthScrollPaneUI.java 文件源码
项目:Java8CN
阅读 29
收藏 0
点赞 0
评论 0
public void componentAdded(ContainerEvent e) {
if (e.getChild() instanceof JTextComponent) {
e.getChild().addFocusListener(this);
viewportViewHasFocus = e.getChild().isFocusOwner();
scrollpane.repaint();
}
}
JButtonBar.java 文件源码
项目:orbit-image-analysis
阅读 19
收藏 0
点赞 0
评论 0
public void componentAdded(ContainerEvent e) {
JButtonBar container = (JButtonBar)e.getContainer();
if (e.getChild() instanceof AbstractButton) {
((ButtonBarUI)container.ui).installButtonBarUI(
(AbstractButton)e.getChild());
((AbstractButton)e.getChild()).addPropertyChangeListener(
"UI",
JButtonBar.uiUpdater);
}
}
JWindowsMenu.java 文件源码
项目:jGAF
阅读 21
收藏 0
点赞 0
评论 0
/**
* Records the addition of a window to the desktop.
*
* @see java.awt.event.ContainerListener#componentAdded(java.awt.event.ContainerEvent)
*/
public void componentAdded(ContainerEvent e) {
if ((this.windowPositioner != null) && (e.getChild() instanceof JInternalFrame)) {
JInternalFrame frame = (JInternalFrame) e.getChild();
Point position = this.windowPositioner.getPosition(frame, getAllVisibleFrames());
frame.setLocation(position);
}
updateWindowsList();
}
MainFrameToolBar.java 文件源码
项目:geoxygene
阅读 25
收藏 0
点赞 0
评论 0
@Override
public final void componentAdded(final ContainerEvent e) {
ProjectFrame projectFrame = this.getMainFrame().getProjectFrameFromGui(
e.getChild());
if (projectFrame != null && projectFrame instanceof ProjectFrame) {
this.addComponent(projectFrame.getLayerViewPanel());
}
}
SynthScrollPaneUI.java 文件源码
项目:jdk8u_jdk
阅读 38
收藏 0
点赞 0
评论 0
public void componentAdded(ContainerEvent e) {
if (e.getChild() instanceof JTextComponent) {
e.getChild().addFocusListener(this);
viewportViewHasFocus = e.getChild().isFocusOwner();
scrollpane.repaint();
}
}
SynthScrollPaneUI.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 36
收藏 0
点赞 0
评论 0
public void componentAdded(ContainerEvent e) {
if (e.getChild() instanceof JTextComponent) {
e.getChild().addFocusListener(this);
viewportViewHasFocus = e.getChild().isFocusOwner();
scrollpane.repaint();
}
}
Container.java 文件源码
项目:j2se_for_android
阅读 26
收藏 0
点赞 0
评论 0
public synchronized void remove(final Component comp) {
if(components == null){
return;
}
final int index = components.indexOf(comp);
if (index >= 0) {
components.remove(index);
comp.parent = null;
final ViewGroup layoutView = (ViewGroup)getContainerViewAdAPI();
final View subView = comp.getPeerAdAPI();
if(layoutView != null && subView != null){
ActivityManager.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
layoutView.removeView(subView);
}
});
}
{
final ContainerEvent event = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, comp);
final ContainerListener[] listener = list.getListeners(ContainerListener.class);
for (int i = 0; i < listener.length; i++) {
listener[i].componentRemoved(event);
}
}
}
if (layout != null) {
layout.removeLayoutComponent(comp);
}
}
JComponent.java 文件源码
项目:javify
阅读 20
收藏 0
点赞 0
评论 0
/**
* Receives notification when a child component is added to the
* JComponent and fires a PropertyChangeEvent on listeners registered
* with the AccessibleJComponent with a property name of
* {@link AccessibleContext#ACCESSIBLE_CHILD_PROPERTY}.
*
* @param event the container event
*/
public void componentAdded(ContainerEvent event)
{
Component c = event.getChild();
if (c != null && c instanceof Accessible)
{
AccessibleContext childCtx = c.getAccessibleContext();
AccessibleJComponent.this.firePropertyChange
(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, null, childCtx);
}
}
JComponent.java 文件源码
项目:javify
阅读 23
收藏 0
点赞 0
评论 0
/**
* Receives notification when a child component is removed from the
* JComponent and fires a PropertyChangeEvent on listeners registered
* with the AccessibleJComponent with a property name of
* {@link AccessibleContext#ACCESSIBLE_CHILD_PROPERTY}.
*
* @param event the container event
*/
public void componentRemoved(ContainerEvent event)
{
Component c = event.getChild();
if (c != null && c instanceof Accessible)
{
AccessibleContext childCtx = c.getAccessibleContext();
AccessibleJComponent.this.firePropertyChange
(AccessibleContext.ACCESSIBLE_CHILD_PROPERTY, childCtx, null);
}
}