Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2011 by The Appdapter Project (www.appdapter.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.appdapter.gui.box;
import java.awt.event.ActionEvent;
import java.lang.reflect.Array;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
import javax.swing.AbstractAction;
import javax.swing.JPopupMenu;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.MutableTreeNode;
import javax.swing.tree.TreeNode;
import org.appdapter.api.trigger.Box;
import org.appdapter.api.trigger.BoxContext;
import org.appdapter.api.trigger.UserResult;
import org.appdapter.core.log.Debuggable;
import org.appdapter.gui.api.BT;
import org.appdapter.gui.api.BoxPanelSwitchableView;
import org.appdapter.gui.api.BrowserPanelGUI;
import org.appdapter.gui.api.DisplayContext;
import org.appdapter.gui.api.DisplayContextProvider;
import org.appdapter.gui.api.GetSetObject;
import org.appdapter.gui.api.NamedObjectCollection;
import org.appdapter.gui.api.ScreenBoxTreeNode;
import org.appdapter.gui.browse.Utility;
import org.appdapter.gui.trigger.PopupAdder;
import org.appdapter.gui.trigger.TriggerAdder;
import org.appdapter.gui.trigger.TriggerPopupMenu;
import org.appdapter.gui.util.Annotations.UIProvider;
/**
* @author Stu B.
*/
@SuppressWarnings("serial")
abstract public class AbstractScreenBoxTreeNodeImpl extends DefaultMutableTreeNode implements GetSetObject, UIProvider, PopupAdder, DisplayContextProvider, DisplayContext {
abstract public String toString();
protected DisplayContext myDisplayContext;
protected BoxPanelSwitchableView bsv;
protected NamedObjectCollection thisNamedObjectCollection;
public BrowserPanelGUI getLocalTreeAPI() {
return (BrowserPanelGUI) Utility.getCurrentContext();
}
final public DisplayContext getDisplayContext() {
DisplayContext foundDC = myDisplayContext;
if (foundDC == null) {
ScreenBoxTreeNode parentNode = getScreenBoxTreeParent();
if (parentNode != null) {
foundDC = parentNode.getDisplayContext();
}
if (foundDC == null && bsv != null) {
//foundDC = Utility. bsv.getDisplayContext();
}
}
return foundDC;
}
/* (non-Javadoc)
* @see org.appdapter.gui.box.DisplayNode#getBox()
*/
final public Box getBox() {
return (Box) super.getUserObject();
}
public abstract Iterable getTreeRepresentedChildren();
public abstract Iterable