Changes between Version 48 and Version 49 of PRO_LIB_CORE_TUTORIAL


Ignore:
Timestamp:
07/14/09 19:21:06 (16 years ago)
Author:
peko
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PRO_LIB_CORE_TUTORIAL

    v48 v49  
    895895 * We have several buttons that need to be positioned at specified locations inside a rectangle. In order to do this we should set the location of every button, one by one upon updating the rectangle. The rectangle itself is kept in the bounds() property. The line "b.swingComponent().get().setLocation(haloBounds.getLocation().toPoint());" gets the JButton out of the HaloButton and sets its location. Since the JButton is not a ProObject but is depending on the bounds() property, we should manually set its location. It we had only one button, its location would have been set in a the resource property it is created. However we have several buttons and only one rectangle. This is just an example of using solely the setUp method of a resource property. Since this method depends on the bounds()'s property everything in it is reinvoked upon changing the bounds. 
    896896 
     897== The ProLib and Eclipse == 
     898 * Writing properties is a very tedious task, since it requires much code writing. However eclipse provides a mechanism for creating templates for pieces of source code that repeat to some extent. In order to take the benefit of this, templates are created for eclipse, that generate the most frequently used properties. In order to import the templates into eclipse follow the next steps: 
     899  * Open "Window" (main menu bar in eclipse) => "Preferences". 
     900  * Go to "Java" => "Editor" => "Templates" (these are located on the left side of the Preferences window). 
     901  * Click on the "Import" button located on the right side of the same window. 
     902   * Templates are located in "/sophie2-platform/dev-tools/eclipse_templates/properties_templates/" that is relative to the root of the repository. 
     903  * The eclipse properties templates are divided into two groups - value properties, list properties. This mean that both ''''list-properties-templates.xml''' and '''value-properties-templates.xml''' should be imported from the directory mentioned above. 
     904 
    897905== TODO == 
    898906 * init final property with constant which isn't an argument of the constructor 
    899907 * finalproperty.init(new stuff()) 
    900  * Expand ''Bad Code Practices'' section 
    901  * code templates 
    902908 * Internals 
    903909  * Registry