580 lines
20 KiB
Java
580 lines
20 KiB
Java
/*
|
|
* Copyright (c) 2007,2009 Declarative Engineering LLC.
|
|
* All rights reserved. This program and the accompanying materials
|
|
* are made available under the terms of the Declarative Engineering LLC
|
|
* verson 1 which accompanies this distribution, and is available at
|
|
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
|
*/
|
|
package com.foundation.view.swt;
|
|
|
|
import org.eclipse.swt.SWT;
|
|
import org.eclipse.swt.events.MenuDetectEvent;
|
|
import org.eclipse.swt.events.MenuDetectListener;
|
|
import org.eclipse.swt.events.SelectionEvent;
|
|
import org.eclipse.swt.events.SelectionListener;
|
|
import org.eclipse.swt.graphics.Image;
|
|
import org.eclipse.swt.widgets.Composite;
|
|
import org.eclipse.swt.widgets.Event;
|
|
import org.eclipse.swt.widgets.Listener;
|
|
import org.eclipse.swt.widgets.Shell;
|
|
|
|
import com.common.debug.Debug;
|
|
import com.common.thread.IRunnable;
|
|
import com.common.util.IIterator;
|
|
import com.common.util.IList;
|
|
import com.common.util.LiteList;
|
|
import com.foundation.controller.AbstractViewController;
|
|
import com.foundation.event.IRequestHandler;
|
|
import com.foundation.view.IAbstractComponent;
|
|
import com.foundation.view.IMethodAssociation;
|
|
import com.foundation.view.IView;
|
|
import com.foundation.view.IViewContext;
|
|
import com.foundation.view.JefImage;
|
|
import com.foundation.view.LinkData;
|
|
import com.foundation.view.SingleAssociationContainer;
|
|
import com.foundation.view.SingleResourceAssociation;
|
|
import com.foundation.view.resource.AbstractResourceService;
|
|
import com.foundation.view.resource.ResourceReference;
|
|
import com.foundation.view.swt.AbstractComponent.Linkage;
|
|
import com.foundation.view.swt.AbstractComponent.Task;
|
|
|
|
public class TrayItem extends AbstractComponent implements IAbstractSwtContainer {
|
|
public static final int LINK_TARGET_IS_VISIBLE = AbstractComponent.LAST_LINK_TARGET + 1;
|
|
public static final int LINK_TARGET_TOOL_TIP_TEXT = AbstractComponent.LAST_LINK_TARGET + 2;
|
|
public static final int LAST_LINK_TARGET = AbstractComponent.LAST_LINK_TARGET + 2;
|
|
|
|
/** The component's name. This allows lookup of components in the view by the name. */
|
|
private String name = null;
|
|
/** The resource defining the visible state for the component. */
|
|
private SingleResourceAssociation isVisible = null;
|
|
/** The resource defining the tool tip text for the component. */
|
|
private SingleResourceAssociation toolTipText = null;
|
|
/** The container's image resource which may be used in different ways depending on the context (such as a frame icon, or a tab image). */
|
|
private SingleResourceAssociation image = null;
|
|
/** A holder for the value of the visibility flag. */
|
|
private ResourceHolder isVisibleHolder = new ResourceHolder(this);
|
|
/** A holder for the value of the tool tip text. */
|
|
private ResourceHolder toolTipTextHolder = new ResourceHolder(this);
|
|
/** A holder for the value of the image. */
|
|
private ResourceHolder imageHolder = new ResourceHolder(this);
|
|
/** The swt image currently used by the tray item. */
|
|
private Image swtImage = null;
|
|
/** The optional menu displayed when the SWT.MenuDetect event is fired by the TrayItem. */
|
|
private Menu menu = null;
|
|
/** The component's controller. */
|
|
private AbstractViewController controller = null;
|
|
/** A collection of components contained by this container. */
|
|
private IList components = new LiteList(10, 30);
|
|
/** A shell used only to support the menu used by the tray item. */
|
|
private Shell shell;
|
|
/** Called when the item is pressed. */
|
|
private IMethodAssociation selectionMethod = null;
|
|
/** The linkage for the selection. */
|
|
private Linkage selectionLinkage = new Linkage();
|
|
/**
|
|
* TrayItem default constructor.
|
|
* <p>Warning: This is only for use by the framework. This should never be called to create a useable instance.</p>
|
|
*/
|
|
public TrayItem() {
|
|
}//TrayItem()//
|
|
/**
|
|
* TrayItem constructor.
|
|
* @param viewContext The context under which this view component operates. For all but the outer most control this can be null.
|
|
* @param name The unique component name.
|
|
* @param style The style of control to construct.
|
|
*/
|
|
public TrayItem(IViewContext viewContext, String name, int style) {
|
|
super(null, viewContext, style, null);
|
|
initialize();
|
|
}//TrayItem()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#initializeControl(int)
|
|
*/
|
|
protected void initializeControl(int style, Object data) {
|
|
setSwtWidget(new org.eclipse.swt.widgets.TrayItem(SwtViewContext.getSingleton().getDisplay().getSystemTray(), style));
|
|
getSwtWidget().setData(this);
|
|
shell = new Shell(SwtViewContext.getSingleton().getDisplay());
|
|
}//initializeControl()//
|
|
/**
|
|
* Initializes the component.
|
|
* <p>Note: This is separated so that a view can be instantiated via the default constructor for the purpose of determining the reflection metadata associated with the view. Any other call to the default constructor will create an invalid view.</p>
|
|
*/
|
|
private void initialize() {
|
|
isVisible = new SingleResourceAssociation(this, this, getViewContext(), SingleResourceAssociation.TYPE_BOOLEAN, false, Boolean.TRUE);
|
|
toolTipText = new SingleResourceAssociation(this, this, getViewContext(), SingleResourceAssociation.TYPE_TEXT, false, null);
|
|
image = new SingleResourceAssociation(this, this, getViewContext(), SingleResourceAssociation.TYPE_IMAGE, false, null);
|
|
}//initialize()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#getResourceService()
|
|
*/
|
|
public AbstractResourceService getResourceService() {
|
|
return getController().getApplication().getResourceService();
|
|
}//getResourceService()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IAbstractContainer#addComponent(com.foundation.view.IAbstractComponent)
|
|
*/
|
|
public void addComponent(IAbstractComponent component) {
|
|
components.add((AbstractComponent) component);
|
|
}//addComponent()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IAbstractContainer#removeComponent(com.foundation.view.IAbstractComponent)
|
|
*/
|
|
public void removeComponent(IAbstractComponent component) {
|
|
components.remove((AbstractComponent) component);
|
|
}//removeComponent()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IAbstractContainer#getComponents()
|
|
*/
|
|
public IList getComponents() {
|
|
return components;
|
|
}//getComponents()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#layout()
|
|
*/
|
|
public void layout() {
|
|
//Does nothing.//
|
|
}//layout()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#getController()
|
|
*/
|
|
public AbstractViewController getController() {
|
|
return controller;
|
|
}//getController()//
|
|
/**
|
|
* Sets the container's associated controller.
|
|
* @param controller The controller for this container.
|
|
*/
|
|
public void setController(AbstractViewController controller) {
|
|
this.controller = controller;
|
|
}//setController()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#getShell()
|
|
*/
|
|
public Shell getShell() {
|
|
return shell;
|
|
}//getShell()//
|
|
/**
|
|
* Gets the system tray item encapsulated by this tray item component.
|
|
* @return The encapsulated tray item, or null if this tray item component does not have a viewable element.
|
|
*/
|
|
public org.eclipse.swt.widgets.TrayItem getSwtTrayItem() {
|
|
return (org.eclipse.swt.widgets.TrayItem) getSwtWidget();
|
|
}//getSwtTrayItem()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IAbstractComponent#getName()
|
|
*/
|
|
public String getName() {
|
|
return name;
|
|
}//getName()//
|
|
/**
|
|
* Adds a link for the selection.
|
|
* @param link The local linkage for the selection.
|
|
*/
|
|
public void addSelectionLink(LinkData link) {
|
|
selectionLinkage.add(link);
|
|
}//addSelectionLink()//
|
|
/**
|
|
* Sets the selection method called when the item is pressed.
|
|
* @param selectionMethod The method called when the tray item is pressed (left clicked).
|
|
*/
|
|
public void setSelectionMethod(IMethodAssociation selectionMethod) {
|
|
verifyThread();
|
|
this.selectionMethod = selectionMethod;
|
|
}//setSelectionMethod()//
|
|
/**
|
|
* Gets the menu used by the tray item, or null if one is not assigned.
|
|
* @return The optional menu for the tray item.
|
|
*/
|
|
public Menu getMenu() {
|
|
verifyThread();
|
|
|
|
return menu;
|
|
}//getMenuBar()//
|
|
/**
|
|
* Sets the component's popup or floating menu.
|
|
* @param menu The normally hidden menu that appears based on user interaction (usually a right click on a windows system).
|
|
*/
|
|
public void setMenu(Menu menu) {
|
|
verifyThread();
|
|
|
|
if(isInitialized() && this.menu != null) {
|
|
this.menu.internalViewReleaseAll();
|
|
this.menu = null;
|
|
}//if//
|
|
|
|
this.menu = menu;
|
|
|
|
if((isInitialized()) && (menu != null)) {
|
|
menu.internalViewInitializeAll();
|
|
}//if//
|
|
}//setMenu()//
|
|
/**
|
|
* Sets the association container used to access whether the control is visible.
|
|
* @param container The visible state association metadata.
|
|
*/
|
|
public void setIsVisibleAssociation(SingleAssociationContainer container) {
|
|
verifyThread();
|
|
this.isVisible.setAssociations(container);
|
|
}//setIsVisibleAssociation()//
|
|
/**
|
|
* Sets the association container used to access the tool tip text.
|
|
* @param container The tool tip association metadata.
|
|
*/
|
|
public void setToolTipTextAssociation(SingleAssociationContainer container) {
|
|
verifyThread();
|
|
this.toolTipText.setAssociations(container);
|
|
}//setToolTipTextAssociation()//
|
|
/**
|
|
* Sets the association container used to access the image.
|
|
* @param container The image association metadata.
|
|
*/
|
|
public void setImageAssociation(SingleAssociationContainer container) {
|
|
verifyThread();
|
|
this.image.setAssociations(container);
|
|
}//setImageAssociation()//
|
|
/**
|
|
* Sets whether the component is visible.
|
|
* @param isVisible Whether the user can see the component.
|
|
*/
|
|
public void setIsVisible(boolean isVisible) {
|
|
verifyThread();
|
|
this.isVisible.externalSetValue(isVisible ? Boolean.TRUE : Boolean.FALSE);
|
|
}//setIsVisible()//
|
|
/**
|
|
* Sets the default visibility.
|
|
* @param isVisible Whether the user can see the component if no other value is provided.
|
|
*/
|
|
public void setDefaultIsVisible(boolean isVisible) {
|
|
verifyThread();
|
|
this.isVisible.setDefaultValue(isVisible ? Boolean.TRUE : Boolean.FALSE);
|
|
}//setDefaultIsVisible()//
|
|
/**
|
|
* Sets the default visibility resource.
|
|
* @param isVisible Whether the user can see the component if no other value is provided.
|
|
*/
|
|
public void setDefaultIsVisible(ResourceReference isVisible) {
|
|
verifyThread();
|
|
this.isVisible.setDefaultValue(isVisible);
|
|
}//setDefaultIsVisible()//
|
|
/**
|
|
* Sets the component's default tool tip text.
|
|
* @param toolTipText The tool tip text to be displayed by this component.
|
|
*/
|
|
public void setDefaultToolTipText(String toolTipText) {
|
|
verifyThread();
|
|
this.toolTipText.setDefaultValue(toolTipText);
|
|
}//setDefaultToolTipText()//
|
|
/**
|
|
* Sets the component's default tool tip text resource.
|
|
* @param tooltipText The tool tip text to be displayed by this component.
|
|
*/
|
|
public void setDefaultToolTipText(ResourceReference toolTipText) {
|
|
verifyThread();
|
|
this.toolTipText.setDefaultValue(toolTipText);
|
|
}//setDefaultToolTipText()//
|
|
/**
|
|
* Sets the default image resource.
|
|
* @param image The image data that will be displayed by the tray.
|
|
*/
|
|
public void setDefaultImage(ResourceReference image) {
|
|
verifyThread();
|
|
this.image.setDefaultValue(image);
|
|
}//setDefaultImage()//
|
|
/**
|
|
* Sets the default image.
|
|
* @param image The image data that will be displayed by the tray.
|
|
*/
|
|
public void setDefaultImage(JefImage image) {
|
|
verifyThread();
|
|
this.image.setDefaultValue(image);
|
|
}//setDefaultImage()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewRefresh()
|
|
*/
|
|
protected void internalViewRefresh() {
|
|
internalViewRefreshIsVisible();
|
|
internalViewRefreshToolTipText();
|
|
internalViewRefreshImage();
|
|
}//internalViewRefresh()//
|
|
/**
|
|
* Refreshes whether the component is visible based on the attribute value or if null the default flag value.
|
|
*/
|
|
protected void internalViewRefreshIsVisible() {
|
|
if(isVisible.refresh()) {
|
|
isVisibleHolder.setValue(isVisible.getValue());
|
|
}//if//
|
|
}//internalViewRefreshIsVisible()//
|
|
/**
|
|
* Refreshes the tool tip text from the tool tip text attribute and the default tool tip text.
|
|
*/
|
|
protected void internalViewRefreshToolTipText() {
|
|
if(toolTipText.refresh()) {
|
|
toolTipTextHolder.setValue(toolTipText.getValue());
|
|
}//if//
|
|
}//internalViewRefreshToolTipText()//
|
|
/**
|
|
* Refreshes the image.
|
|
*/
|
|
protected void internalViewRefreshImage() {
|
|
if(image.refresh()) {
|
|
imageHolder.setValue(image.getValue());
|
|
}//if//
|
|
}//internalViewRefreshImage()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewRefreshAll()
|
|
*/
|
|
public void internalViewRefreshAll() {
|
|
IIterator iterator = components.iterator();
|
|
|
|
//Refresh value holders.//
|
|
while(iterator.hasNext()) {
|
|
AbstractComponent component = (AbstractComponent) iterator.next();
|
|
|
|
if(component instanceof ValueHolder) {
|
|
component.internalViewRefreshAll();
|
|
}//if//
|
|
}//for//
|
|
|
|
if(getMenu() != null) {
|
|
getMenu().internalViewRefreshAll();
|
|
}//if//
|
|
|
|
super.internalViewRefreshAll();
|
|
}//internalViewRefreshAll()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewSynchronizeAll()
|
|
*/
|
|
public void internalViewSynchronizeAll() {
|
|
if(getMenu() != null) {
|
|
getMenu().internalViewSynchronizeAll();
|
|
}//if//
|
|
|
|
super.internalViewSynchronizeAll();
|
|
}//internalViewSynchronizeAll()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewInitializeAll()
|
|
*/
|
|
public void internalViewInitializeAll() {
|
|
IIterator iterator = components.iterator();
|
|
|
|
super.internalViewInitializeAll();
|
|
|
|
//Initialize contained value holders first.//
|
|
while(iterator.hasNext()) {
|
|
AbstractComponent component = (AbstractComponent) iterator.next();
|
|
|
|
if(component instanceof ValueHolder) {
|
|
component.internalViewInitializeAll();
|
|
}//if//
|
|
}//for//
|
|
|
|
if(menu != null) {
|
|
menu.internalViewInitializeAll();
|
|
}//if//
|
|
}//internalViewInitializeAll()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewReleaseAll()
|
|
*/
|
|
public void internalViewReleaseAll() {
|
|
IIterator iterator = new LiteList(getComponents()).iterator();
|
|
|
|
if(getMenu() != null) {
|
|
getMenu().internalViewReleaseAll();
|
|
}//if//
|
|
|
|
//Release sub-components.//
|
|
while(iterator.hasNext()) {
|
|
AbstractComponent component = (AbstractComponent) iterator.next();
|
|
|
|
component.internalViewReleaseAll();
|
|
}//for//
|
|
|
|
super.internalViewReleaseAll();
|
|
}//internalViewReleaseAll()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewInitialize()
|
|
*/
|
|
protected void internalViewInitialize() {
|
|
getSwtTrayItem().addListener(SWT.MenuDetect, new Listener() {
|
|
public void handleEvent(Event event) {
|
|
if(menu != null) {
|
|
menu.getSwtMenu().setVisible(true);
|
|
}//if//
|
|
}//handleEvent()//
|
|
});
|
|
getSwtTrayItem().addSelectionListener(new SelectionListener() {
|
|
public void widgetSelected(SelectionEvent e) {
|
|
if(selectionMethod != null) {
|
|
selectionMethod.invoke(new Object[] {new Integer(e.x), new Integer(e.y)}, true);
|
|
}//if//
|
|
else if(menu != null) {
|
|
menu.getSwtMenu().setVisible(true);
|
|
}//else if//
|
|
|
|
selectionLinkage.invoke(null);
|
|
}//widgetSelected()//
|
|
public void widgetDefaultSelected(SelectionEvent e) {
|
|
}//widgetDefaultSelected()//
|
|
});
|
|
isVisible.initialize();
|
|
toolTipText.initialize();
|
|
image.initialize();
|
|
super.internalViewInitialize();
|
|
}//internalViewInitialize()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalViewRelease()
|
|
*/
|
|
protected void internalViewRelease() {
|
|
destroyImage(swtImage);
|
|
|
|
isVisible.release();
|
|
toolTipText.release();
|
|
image.release();
|
|
|
|
toolTipTextHolder.release();
|
|
isVisibleHolder.release();
|
|
imageHolder.release();
|
|
|
|
if(getSwtTrayItem() != null && !getSwtTrayItem().isDisposed()) {
|
|
getSwtTrayItem().dispose();
|
|
}//if//
|
|
|
|
super.internalViewRelease();
|
|
}//internalViewRelease()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalOnLinkInvoked(int, java.lang.Object)
|
|
*/
|
|
protected void internalOnLinkInvoked(int linkTarget, Object data) {
|
|
switch(linkTarget) {
|
|
case LINK_TARGET_IS_VISIBLE: {
|
|
getSwtTrayItem().setVisible(data != null && data instanceof Boolean ? ((Boolean) data).booleanValue() : false);
|
|
break;
|
|
}//case//
|
|
case LINK_TARGET_TOOL_TIP_TEXT: {
|
|
getSwtTrayItem().setToolTipText(data instanceof String ? (String) data : "");
|
|
break;
|
|
}//case//
|
|
default: {
|
|
super.internalOnLinkInvoked(linkTarget, data);
|
|
break;
|
|
}//default//
|
|
}//switch//
|
|
}//internalOnLinkInvoked()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalOnValueChanged(com.foundation.view.SingleResourceAssociation)
|
|
*/
|
|
protected void internalOnValueChanged(SingleResourceAssociation resourceAssociation, int flags) {
|
|
if(resourceAssociation == isVisible) {
|
|
internalViewRefreshIsVisible();
|
|
}//if//
|
|
else if(resourceAssociation == toolTipText) {
|
|
internalViewRefreshToolTipText();
|
|
}//else if//
|
|
else if(resourceAssociation == image) {
|
|
internalViewRefreshImage();
|
|
}//else if//
|
|
else {
|
|
super.internalOnValueChanged(resourceAssociation, flags);
|
|
}//else//
|
|
}//internalOnValueChanged()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.AbstractComponent#internalResourceHolderChanged(com.foundation.view.swt.ResourceHolder, java.lang.Object, java.lang.Object)
|
|
*/
|
|
protected void internalResourceHolderChanged(ResourceHolder resource, Object oldValue, Object newValue, int flags) {
|
|
if(resource == toolTipTextHolder) {
|
|
String value = (String) toolTipText.getValue();
|
|
|
|
//Set the control's tool tip text. This is normally enough, but some controls may need extra processing (hence the listeners).//
|
|
getSwtTrayItem().setToolTipText(value);
|
|
}//if//
|
|
else if(resource == imageHolder) {
|
|
destroyImage(swtImage);
|
|
swtImage = createImage((JefImage) imageHolder.getValue());
|
|
getSwtTrayItem().setImage(swtImage);
|
|
}//else if//
|
|
else if(resource == isVisibleHolder) {
|
|
if(!getSwtTrayItem().isDisposed()) {
|
|
getSwtTrayItem().setVisible(((Boolean) newValue).booleanValue());
|
|
}//if//
|
|
}//else if//
|
|
else {
|
|
super.internalResourceHolderChanged(resource, oldValue, newValue, flags);
|
|
}//else//
|
|
}//internalOnAssociationChanged()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.IAbstractSwtContainer#getSwtComposite()
|
|
*/
|
|
public Composite getSwtComposite() {
|
|
return null;
|
|
}//getSwtComposite()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.swt.IAbstractSwtContainer#getSwtParent()
|
|
*/
|
|
public Composite getSwtParent() {
|
|
return null;
|
|
}//getSwtParent()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#center()
|
|
*/
|
|
public void center() {
|
|
}//center()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#center(com.foundation.view.IView)
|
|
*/
|
|
public void center(IView centerOnView) {
|
|
}//center()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#execute(com.common.thread.IRunnable)
|
|
*/
|
|
public Object execute(IRunnable runnable) {
|
|
return getViewContext().getRequestHandler().execute(runnable);
|
|
}//execute()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#executeAsynch(com.common.thread.IRunnable)
|
|
*/
|
|
public void executeAsync(IRunnable runnable) {
|
|
getViewContext().getRequestHandler().executeAsync(runnable);
|
|
}//executeAsynch()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#getRequestHandler()
|
|
*/
|
|
public IRequestHandler getRequestHandler() {
|
|
return getViewContext().getRequestHandler();
|
|
}//getRequestHandler()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#maximize()
|
|
*/
|
|
public void maximize() {
|
|
}//maximize()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#minimize()
|
|
*/
|
|
public void minimize() {
|
|
}//minimize()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#pack()
|
|
*/
|
|
public void pack() {
|
|
}//pack()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#setFocus()
|
|
*/
|
|
public void setFocus() {
|
|
}//setFocus()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#setIsEnabled(boolean)
|
|
*/
|
|
public void setIsEnabled(boolean isEnabled) {
|
|
}//setIsEnabled()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.view.IView#show()
|
|
*/
|
|
public void show() {
|
|
}//show()//
|
|
/* (non-Javadoc)
|
|
* @see java.lang.Object#toString()
|
|
*/
|
|
public String toString() {
|
|
return super.toString() + (getName() != null ? " (named: " + getName() + ")" : "");
|
|
}//toString()//
|
|
}//TrayItem// |