jimm.datavision.gui.applet
Class DesignApplet

java.lang.Object
  extended by jimm.datavision.gui.Designer
      extended by jimm.datavision.gui.applet.DesignApplet
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.util.Observer

 class DesignApplet
extends Designer

A designer suitable for use with applets. This designer is created by a DVApplet in its init method.

Author:
Jim Menard, jimm@io.com

Field Summary
 
Fields inherited from class jimm.datavision.gui.Designer
aggrItem, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_SNAP_TO_GRID, ALIGN_TOP, alignSubmenu, borderItem, boundsItem, chooser, commandHistory, connectionItem, copyItem, cutItem, defaultFormatItem, delGroupItem, delSectionItem, delSelectionItem, designWindows, exitWhenLastWindowClosed, exportItem, formatItem, frame, GRID_SIZE, groupByItem, groupItem, ignoreKeys, paperSizeSubmenu, pasteItem, placingNewTextField, redoItem, report, reportFilePath, rootPaneContainer, runItem, scroller, sectionContainer, sectionWidgets, sectItem, selectedFields, selectRecordsItem, SIZE_SAME_HEIGHT, SIZE_SAME_SIZE, SIZE_SAME_WIDTH, sizeSubmenu, sortByItem, sqlQueryTextItem, subreportItem, tableJoinItem, undoItem
 
Constructor Summary
DesignApplet(DVApplet applet)
           
 
Method Summary
protected  DVApplet getAppletViaCheapTrick()
          A cheap trick: we need the applet but this method is called from the constructor indirectly so we can't assign the applet to an instance var of the correct type.
protected  boolean readReport(java.lang.String fileName, java.lang.String databasePassword)
          Reads the named report file or, if it's null, creates a new, empty report.
protected  void receiveResponse(java.net.URLConnection conn)
           
protected  void saveReportAs()
          Saves the current report to a URL specified by the user.
protected  void sendData(java.net.URLConnection conn)
           
protected  void writeReportFile(java.lang.String fileName)
          Writes the current report to the specified file.
 
Methods inherited from class jimm.datavision.gui.Designer
about, actionPerformed, addCommand, addTitleField, addWindow, align, buildDatabaseMenu, buildEditMenu, buildFileMenu, buildFormatMenu, buildHelpMenu, buildInsertMenu, buildMenuBar, buildReportMenu, buildSections, buildSectionsInArea, buildWindow, changePaperOrientation, changePaperSize, closeMe, copySelectedFields, createImageField, deleteSection, deleteSelectedFields, deleteSelectedFieldsAnd, deleteWindow, deselectAll, doDeleteSection, dragSelectedWidgets, enableMenuItems, exportReport, findSectionWidgetFor, findWindowFor, getChooser, getFrame, getReport, getSectionWidgetUnder, help, insertSectionWidgetAfter, insertSubreport, invalidate, maybeClose, maybeQuit, newReport, openAggregateWin, openBoundsWin, openDbConnWin, openDefaultFormatWin, openDescripWin, openFieldPickerWin, openFormatWin, openGroupWin, openNewGroupWin, openReport, openScriptingWin, openSortWin, openStartupScriptEditor, openVisTableWin, openWhereClauseEditor, paperSizeChanged, paste, performCommand, placeNewTextField, readReport, rebuildGroups, renameSectionWidgets, renameSectionWidgetsIn, runReport, savePrefsDir, saveReport, select, setExitWhenLastWinClosed, setIgnoreKeys, setPrefsDir, showSQL, size, snapToGrid, someSelectedFieldUsesFormat, update, updatePaperSizeMenu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesignApplet

DesignApplet(DVApplet applet)
Method Detail

readReport

protected boolean readReport(java.lang.String fileName,
                             java.lang.String databasePassword)
Reads the named report file or, if it's null, creates a new, empty report. Returns true if we need to ask the user for connection info because this is a new report.

Parameters:
fileName -
databasePassword - string to give to report; OK if it's null
Returns:
true if we need to ask the user for connection info

getAppletViaCheapTrick

protected DVApplet getAppletViaCheapTrick()
A cheap trick: we need the applet but this method is called from the constructor indirectly so we can't assign the applet to an instance var of the correct type. However, we passed the applet in as our root pane container.

Returns:
the applet

saveReportAs

protected void saveReportAs()
Saves the current report to a URL specified by the user.

Overrides:
saveReportAs in class Designer

writeReportFile

protected void writeReportFile(java.lang.String fileName)
Writes the current report to the specified file. Also tells the command history the report has been saved so it knows how to report if any changes have been made from this point on.

Overrides:
writeReportFile in class Designer
Parameters:
fileName - a file name

sendData

protected void sendData(java.net.URLConnection conn)
                 throws java.io.IOException
Throws:
java.io.IOException

receiveResponse

protected void receiveResponse(java.net.URLConnection conn)
                        throws java.io.IOException
Throws:
java.io.IOException