swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setFileOutput (java)


From: Russell Bryer
Subject: Re: setFileOutput (java)
Date: Tue, 21 Aug 2001 22:50:19 +0100

I need to do this often. This is a code snippet from my
source. Hope it helps. I find the setSaveSizeFlag(true) is
very helpful as it store the size aswell as the position of
the graph when you click the Save button on the control
panel.

    private boolean createBookingGraph(TourOp tourOp,
EZGraph graph) {
        // Create a graph object for the booking graph
        EZGraphC bookingGraphC;
        bookingGraphC = new EZGraphCImpl (new EZGraphImpl
());

        bookingGraphC.createBegin(aZone);
        bookingGraphC.setFileName("BKG_" +
tourOp.companyName);
        bookingGraphC.setFileOutput(this.logToFile);
        bookingGraphC.setGraphics(this.displayGraphics);
        bookingGraphC.setTitle("Booking Statistics "+
tourOp.companyName);
        bookingGraphC.setAxisLabelsX$Y("Day of Selling
Season","Number");

bookingGraphC.setWindowGeometryRecordName("bookingsGraph" +
tourOp.companyName);
        bookingGraphC.setSaveSizeFlag(true);
        graph = (EZGraph) bookingGraphC.createEnd ();

        // create the data feed for the graph. Note that the
function
        // required from the selector must be declared
public.
        try {

graph.createSequence$withFeedFrom$andSelector("TotalVolume",
tourOp,
                new Selector
(tourOp.getClass(),"getTodayTotalBooking", false));

        } catch (Exception e) {
            System.err.println("Exception bookingGraph : "
+e.getMessage());
            e.printStackTrace (System.err);
            return false;
        }

        return true;
    }




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]