18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BUILDING APPLICATIONS WITH VISUAL JAVABEANS<br />

import java.io.IOException;<br />

import java.text.SimpleDateFormat;<br />

import java.util.Date;<br />

import com.linar.jintegra.AutomationException;<br />

import com.esri.arcgis.carto.IActiveView;<br />

import com.esri.arcgis.carto.TextElement;<br />

import com.esri.arcgis.carto.esriViewDrawPhase;<br />

import com.esri.arcgis.display.TextSymbol;<br />

import com.esri.arcgis.geometry.IPoint;<br />

import com.esri.arcgis.support.ms.stdole.StdFont;<br />

import com.esri.arcgis.systemUI.ICommand;<br />

import com.esri.arcgis.systemUI.ITool;<br />

public class AddDateCommand implements ICommand, ITool {<br />

/*<br />

* see com.esri.arcgis.systemUI.ICommand#isEnabled()<br />

*/<br />

public boolean isEnabled() throws IOException, AutomationException {<br />

return true;<br />

}<br />

/*<br />

* see com.esri.arcgis.systemUI.ICommand#isChecked()<br />

*/<br />

public boolean isChecked() throws IOException, AutomationException {<br />

return false;<br />

}<br />

/*<br />

* see com.esri.arcgis.systemUI.ICommand#getName()<br />

*/<br />

public String getName() throws IOException, AutomationException {<br />

return "CustomCommands_Add Date";<br />

}<br />

/*<br />

* see com.esri.arcgis.systemUI.ICommand#getCaption()<br />

*/<br />

public String getCaption() throws IOException, AutomationException {<br />

return "Add Date";<br />

}<br />

/*<br />

* see com.esri.arcgis.systemUI.ICommand#getTooltip()<br />

*/<br />

public String getTooltip() throws IOException, AutomationException {<br />

return "Add date";<br />

}<br />

Chapter 6 • <strong>Developer</strong> scenarios • 321

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!