コード例 #1
0
 /*
  * The following method creates the font menu
  * postcondition: returns the JMenu for the font menu.
  */
 public JMenu createFontMenu() {
   JMenu menu = new JMenu(new String("Font"));
   menu.add(createFontNameMenu());
   menu.add(createFontSizeMenu());
   menu.add(createFontStyleMenu());
   return menu;
 } // end createFontMenu method
コード例 #2
0
 /*
  * The following method creates the submenu to choose a font style
  * postcondition: returns the JMenu for the font style submenu.
  */
 public JMenu createFontStyleMenu() {
   JMenu menu = new JMenu(new String("Style"));
   menu.add(createFontStyleItem(new String("Plain")));
   menu.add(createFontStyleItem(new String("Italic")));
   menu.add(createFontStyleItem(new String("Bold")));
   menu.add(createFontStyleItem(new String("Bold Italic")));
   return menu;
 } // end createFontStyleMenu method
コード例 #3
0
 /*
  * The following method creates the submenu to choose a font size
  * postcondition: returns the JMenu for the font size submenu.
  */
 public JMenu createFontSizeMenu() {
   JMenu menu = new JMenu(new String("Size"));
   menu.add(createFontSizeItem(SMALLEST));
   menu.add(createFontSizeItem(SMALL));
   menu.add(createFontSizeItem(SMALL_MEDIUM));
   menu.add(createFontSizeItem(MEDIUM));
   menu.add(createFontSizeItem(MEDIUM_LARGE));
   menu.add(createFontSizeItem(LARGE));
   menu.add(createFontSizeItem(LARGEST));
   menu.add(createFontSizeItem(HUGE));
   menu.add(createFontSizeItem(WOW));
   return menu;
 } // end createFontSizeMenu method
コード例 #4
0
 /*
  * The following method creates the submenu to choose a font name
  * postcondition: returns the JMenu for the font name submenu.
  */
 public JMenu createFontNameMenu() {
   // YOU MUST ALTER THESE BASED ON YOUR SYSTEM
   JMenu menu = new JMenu(new String("Name"));
   menu.add(createFontNameItem(new String("Serif")));
   menu.add(createFontNameItem(new String("Times")));
   menu.add(createFontNameItem(new String("Agent Orange")));
   menu.add(createFontNameItem(new String("Aldo's Nova")));
   menu.add(createFontNameItem(new String("American Typewriter")));
   menu.add(createFontNameItem(new String("American Typewriter Condensed")));
   menu.add(createFontNameItem(new String("American Typewriter Light")));
   menu.add(createFontNameItem(new String("Andale Mono")));
   menu.add(createFontNameItem(new String("AntsyPants")));
   menu.add(createFontNameItem(new String("Apple Chancery")));
   menu.add(createFontNameItem(new String("Arial")));
   menu.add(createFontNameItem(new String("Arial Black")));
   menu.add(createFontNameItem(new String("Arial Narrow")));
   menu.add(createFontNameItem(new String("Aristocrat LET")));
   menu.add(createFontNameItem(new String("AstigamaTizm")));
   menu.add(createFontNameItem(new String("BASEHEAD")));
   menu.add(createFontNameItem(new String("Baskerville")));
   menu.add(createFontNameItem(new String("BellBottom")));
   menu.add(createFontNameItem(new String("Bertram LET")));
   menu.add(createFontNameItem(new String("BiauKai")));
   menu.add(createFontNameItem(new String("Bickley Script LET")));
   menu.add(createFontNameItem(new String("Bite me")));
   menu.add(createFontNameItem(new String("Bizarro")));
   menu.add(createFontNameItem(new String("Bodoni Ornaments ITC TT")));
   menu.add(createFontNameItem(new String("Calaveras")));
   menu.add(createFontNameItem(new String("Capitals")));
   menu.add(createFontNameItem(new String("Century Gothic")));
   menu.add(createFontNameItem(new String("Chalkboard")));
   menu.add(createFontNameItem(new String("Charcoal")));
   menu.add(createFontNameItem(new String("Chicago")));
   menu.add(createFontNameItem(new String("Cochin")));
   menu.add(createFontNameItem(new String("Comic Sans MS")));
   menu.add(createFontNameItem(new String("Copperplate")));
   menu.add(createFontNameItem(new String("Courier")));
   menu.add(createFontNameItem(new String("Courier New")));
   menu.add(createFontNameItem(new String("Curlz MT")));
   menu.add(createFontNameItem(new String("Didot")));
   menu.add(createFontNameItem(new String("Edwardian Script ITC")));
   menu.add(createFontNameItem(new String("Fang Song")));
   menu.add(createFontNameItem(new String("Fortuna Dot")));
   menu.add(createFontNameItem(new String("Futura")));
   menu.add(createFontNameItem(new String("Gadget")));
   menu.add(createFontNameItem(new String("Geeza Pro")));
   menu.add(createFontNameItem(new String("Geneva")));
   menu.add(createFontNameItem(new String("Georgia")));
   menu.add(createFontNameItem(new String("Gill Sans")));
   menu.add(createFontNameItem(new String("Gringo Nights")));
   menu.add(createFontNameItem(new String("Hei")));
   menu.add(createFontNameItem(new String("Helvetica")));
   menu.add(createFontNameItem(new String("Herculanum")));
   menu.add(createFontNameItem(new String("Hypmotizin")));
   menu.add(createFontNameItem(new String("Impact")));
   menu.add(createFontNameItem(new String("Jokerman LET")));
   menu.add(createFontNameItem(new String("MadisonSquare")));
   menu.add(createFontNameItem(new String("MammaGamma")));
   menu.add(createFontNameItem(new String("Mathmos Original")));
   menu.add(createFontNameItem(new String("MammaGamma")));
   menu.add(createFontNameItem(new String("Marker Felt")));
   menu.add(createFontNameItem(new String("MassiveHeadache3")));
   menu.add(createFontNameItem(new String("Parry Hotter")));
   return menu;
 } // end createFontNameMenu method
コード例 #5
0
 /*
  * The following method creates the file menu
  * postcondition: returns the JMenu for the file menu.
  */
 public JMenu createFileMenu() {
   JMenu menu = new JMenu(new String("File"));
   menu.add(createFileResetItem());
   menu.add(createFileExitItem());
   return menu;
 } // end createFileMenu method