Class FeldmanVisual
java.lang.Object
eu.bandm.music.applications.feldproj.FeldmanVisual
Creates a sequence of pages which come close to the original graphic notation of 
  Morton Feldman.
  Use only once: construct a fresh instance for a score and call 
render(int,int).
  After completion one (a) can get the images from pages 
  or (b) let them write to ".png" files by writeToFiles(java.io.File,java.lang.String).
  The dimensions are as follows
     <---------- page width ------------------------------------>
     <---------- text width ------------------------------->
       leftMargin                                           <--->
     <--->           measureWidth                           rightMargin
          <--------><--------><--------><--------><-------->
(0,0)*-----------------------------------------------------------+  
     | > topmargin                                               |  ^
     | 0  [1]______   (<---Taktzahlen--->)        [5]            |  |
     | 1  |________|  > eventHeight  ^ :   (y grows downward!)   |  |
     | 2  |________|                 | :      |                  |  |textheight
     | 3  |________|                 | staffSkip                 |  |
     | 4   ________:_________________V_:      V     > interStaffGap 
     | 5  |________|     _    ;        :                         |  |
     | 6           :    |_|   :        :                         |  |
     | 7           :__________:        :                         |  |
     | ...                                                       |  ..
     | n*4.3                                                     |  |
     | n*4-2                                                     |  |
     | n*4-1                  |_________|                        |  |
     | n*4                                                       |  |
     | n*4+1         [author, page number etc.]                  |  V
     +-----------------------------------------------------------+
  - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRepreents the "harmonic" modifier and the harmonic voice name.protected intCalculated value, evidentprotected intCalculated value: linewidth for draeing the boxes of the events.The next event to start in the drawing process (may be wide in the future)protected intCalculated value which separates stavesevident(package private) intSee graphic at class level.The measure start just below or equal to the start of the event ineventsstatic final intstatic final intprotected intThe vertical positions on which the measure numbers are printed.protected intCalculated value, evident(package private) final SimpleMessage.Sender<XMLDocumentIdentifier> (package private) final MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> protected intHow far the end of the voice name is separated from the first measure line.The events currently tsill running when the next measure is started.protected intHow far the box which overlaps a page break overlaps the measure bar.protected List<BufferedImage> Result = list of the images prdouced byrender(int,int).(package private) intSee graphic at class level.The measure start just above or equal to the end of the event inevents(package private) intSee graphic at class level.protected final FeldmanProjection_nThe score data which is rendered by this instance.protected final intAt which distance a measure number shall be displayed.protected final booleanWhether the measure number shall be displayed with every first measure on a page.evidentevidentprotected intCalculated value, from the lowest line of one staff to the lowest line of its neighbourCauses that this staff is linked to the preceding (upper neighbour) staff by one "accolade" (=bracket), forming a "piano staff".(package private) intSee graphic at class level.(package private) intSee graphic at class level.static final intSee graphic at class level.evident - 
Constructor Summary
ConstructorsConstructorDescriptionFeldmanVisual(FeldmanProjection_n score, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr, @Opt Color backgroundColor)  - 
Method Summary
Modifier and TypeMethodDescriptionConstructs a top-level Swing object which presents all generated images, for immediate inspection.static voidStand-alone application, translates input file "arg[0]" and shows a swing windows with a "tabbed pane" with all the rendered pages.protected voidFill all the caches with the coordinates of the next event in the given voice.voidrender(int width, int height) Central Point of Service.voidwriteToFiles(File dir, String stem) Write all generated images into files, in the ".png" format.protected intReturns the top cooordinate where to draw a box for an event, or of the top line of the staff if no event given.protected intyStaff(int staff) Returns the upper (numerically lower) y-coordinate of the region of the biven staff. 
- 
Field Details
- 
score
The score data which is rendered by this instance. - 
msgr
 - 
msg
 - 
backgroundColor
 - 
voice2staff
evident - 
staff2shortName
evident - 
staff2longName
evident - 
subordinates
Causes that this staff is linked to the preceding (upper neighbour) staff by one "accolade" (=bracket), forming a "piano staff". Is currently only used for "harmonic" voices: Both voices are started synchronuously, an accolade is drawn, and the name of the former is centralized, - 
textWidth
int textWidthSee graphic at class level. - 
maxRightMargin
public static final int maxRightMargin- See Also:
 
 - 
rightMargin
int rightMarginSee graphic at class level. Is a certain percentage ofpageWidth, limited bymaxRightMargin. - 
pageWidth
int pageWidthSee graphic at class level. - 
maxLeftMargin
public static final int maxLeftMargin- See Also:
 
 - 
leftMargin
int leftMarginSee graphic at class level. Is a certain percentage ofpageWidth, limited bymaxLeftMargin. - 
textHeight
int textHeightSee graphic at class level. - 
topMargin
public static final int topMarginSee graphic at class level.- See Also:
 
 - 
MEASURE_BASELINE
protected int MEASURE_BASELINEThe vertical positions on which the measure numbers are printed. - 
OVERLAP
protected int OVERLAPHow far the box which overlaps a page break overlaps the measure bar. - 
NAME_DISTANCE
protected int NAME_DISTANCEHow far the end of the voice name is separated from the first measure line. - 
showMeasureNumber_every
protected final int showMeasureNumber_everyAt which distance a measure number shall be displayed. Sensible values are 4, 5, 10, etc. Set to 10_000 (or sim.) for no display.- See Also:
 
 - 
showMeasureNumber_pageStart
protected final boolean showMeasureNumber_pageStartWhether the measure number shall be displayed with every first measure on a page.- See Also:
 
 - 
DIAMOND
Repreents the "harmonic" modifier and the harmonic voice name. Is unicode U+25C7 = WHITE DIAMOND.- See Also:
 
 - 
interStaffGap
protected int interStaffGapCalculated value which separates staves - 
measureWidth
protected int measureWidthCalculated value, evident - 
eventHeight
protected int eventHeightCalculated value, evident - 
staffSkip
protected int staffSkipCalculated value, from the lowest line of one staff to the lowest line of its neighbour - 
eventLineWidth
protected int eventLineWidthCalculated value: linewidth for draeing the boxes of the events. - 
pages
Result = list of the images prdouced byrender(int,int). - 
iterators
evident - 
events
The next event to start in the drawing process (may be wide in the future) - 
leftStart
The measure start just below or equal to the start of the event inevents - 
rightEnd
The measure start just above or equal to the end of the event inevents - 
openEvents
The events currently tsill running when the next measure is started. 
 - 
 - 
Constructor Details
- 
FeldmanVisual
public FeldmanVisual(FeldmanProjection_n score, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msgr, @Opt @Opt Color backgroundColor)  
 - 
 - 
Method Details
- 
render
public void render(int width, int height) Central Point of Service.- Parameters:
 width- pixel width of the generated imageheight- pixel height of the generated image
 - 
nextEvent
Fill all the caches with the coordinates of the next event in the given voice. - 
yLow
Returns the top cooordinate where to draw a box for an event, or of the top line of the staff if no event given. ("Low" means "numerically low" = "graphically top" !) - 
yStaff
protected int yStaff(int staff) Returns the upper (numerically lower) y-coordinate of the region of the biven staff. - 
getFrame
Constructs a top-level Swing object which presents all generated images, for immediate inspection. - 
writeToFiles
Write all generated images into files, in the ".png" format. The files will be "/ _000.png", "/ _0010.png", etc. Can be called afterrender(int,int). - 
main
Stand-alone application, translates input file "arg[0]" and shows a swing windows with a "tabbed pane" with all the rendered pages. 
 -