Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions

:
#)ArTrxAgentGridScreen. Copyright © 2012 tourapp.com. All rights reserved. GPL3 Open Source Software License.
  
  package com.tourapp.tour.acctrec.screen.display;
  
  import java.util.*;
  
ArTrxAgentGridScreen - Agent A/R Account inquiry.
 
 public class ArTrxAgentGridScreen extends GridScreen
 {
    
Default constructor.
 
     public ArTrxAgentGridScreen()
     {
         super();
     }
    
Constructor.

Parameters:
record The main record for this screen.
itsLocation The location of this component within the parent.
parentScreen The parent screen.
fieldConverter The field this screen field is linked to.
iDisplayFieldDesc Do I display the field desc?.
 
     public ArTrxAgentGridScreen(Record recordScreenLocation itsLocationBasePanel parentScreenConverter fieldConverterint iDisplayFieldDescMap<String,Objectproperties)
     {
         this();
         this.init(recorditsLocationparentScreenfieldConverteriDisplayFieldDescproperties);
     }
    
Constructor.

Parameters:
record The main record for this screen.
itsLocation The location of this component within the parent.
parentScreen The parent screen.
fieldConverter The field this screen field is linked to.
iDisplayFieldDesc Do I display the field desc?.
 
     public void init(Record recordScreenLocation itsLocationBasePanel parentScreenConverter fieldConverterint iDisplayFieldDescMap<String,Objectproperties)
     {
         super.init(recorditsLocationparentScreenfieldConverteriDisplayFieldDescproperties);
         
         if (this.getRecord(.).getField(.).getComponent(0) != null)
     }
    
Get the screen display title.
 
     public String getTitle()
     {
         return "Agent A/R Account inquiry";
     }
    
Override this to open the main file.

You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)).

Returns:
The new record.
 
     public Record openMainRecord()
     {
         return new Booking(this);
     }
    
Override this to open the other files in the query.
 
     public void openOtherRecords()
     {
         super.openOtherRecords();
         new ArTrx(this);
         new Profile(this);
         new BookingLine(this);
     }
    
Add the screen fields. Override this to create (and return) the screen record for this recordowner.

Returns:
The screen record.
    public Record addScreenRecord()
    {
        return new ArTrxAgentScreenRecord(this);
    }
    
Add all the screen listeners.
    public void addListeners()
    {
        super.addListeners();
        
        this.getMainRecord().addListener(new SubFileFilter(this.getRecord(.), true));
        
        Record recArTrx = this.getRecord(.);
        Record recBooking = this.getRecord(.);
        Record recBookingLine = this.getRecord(.);
        recArTrx.addListener(new SubFileFilter(recBooking));
        recBooking.addListener(new RecountOnValidHandler(recArTrx));
        recArTrx.addListener(new SubCountHandler(recBooking.getField(.), .truetrue));
        recBookingLine.addListener(new SubFileFilter(recBooking));
        recBooking.addListener(new RecountOnValidHandler(recBookingLine));
        recBookingLine.addListener(new SubCountHandler(recBooking.getField(.), .truetrue));
        recBookingLine.addListener(new SubCountHandler(recBooking.getField(.), .truetrue));
        
        recBooking.addListener(new SubCountHandler(this.getScreenRecord().getField(.), .truetrue));
        
        this.setEnabled(false);
        this.setAppending(false);
    }
    
If there is a header record, return it, otherwise, return the main record. The header record is the (optional) main record on gridscreens and is sometimes used to enter data in a sub-record when a header is required.

Returns:
The header record.
    public Record getHeaderRecord()
    {
        return this.getRecord(.);
    }
    
SetupSFields Method.
    public void setupSFields()
    {
    }
    
Make a sub-screen.

Returns:
the new sub-screen.
    public BasePanel makeSubScreen()
    {
        return new ArTrxAgentHeaderScreen(nullthisnull.null);
    }
New to GrepCode? Check out our FAQ X