Size of MenuItem

I am using MenuButton a lot. To have a nice layout I often make the size of the button larger as needed just for nice layout purposes. What I can't get right yet is the size of the menuitems in a menubutton. It really looks bad if you have a large MenuButton and you open the menu that the contents is very small compared the button above.
Anyway to change this?

This is not a good solution, but I could not come up with a good solution, so you can try this - at least it seems to work for me . . .
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.*;
import javafx.scene.text.Text;
import javafx.stage.Stage;
/** Sizes the drop down menu for a menu button to at least same width as the menu button */
public class MenuButtonSizing extends Application {
  private static final String FROBOZZ = "Frobozz";
  private static final String ZORK    = "Zork";
  public static void main(String[] args) { launch(args); }
  @Override public void start(Stage stage) {
    final MenuButton menuButton = new MenuButton("XYZZY is the Magic Word");
    final Label selection = new Label();
    final VBox layout = new VBox(30);
    layout.getChildren().setAll(selection, menuButton);
    layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 50;");
    stage.setScene(new Scene(layout));
    stage.show();
    // for the sizing to work correctly, the SizingMenuItem must be created
    // for the menu button after the menu button has been shown.
    SizingMenuItem frobozzItem = new SizingMenuItem(menuButton, FROBOZZ);
    frobozzItem.setOnAction(new EventHandler<ActionEvent>() {
      @Override public void handle(ActionEvent t) {
        selection.setText(FROBOZZ);
    MenuItem zorkItem = new MenuItem(ZORK);
    zorkItem.setOnAction(new EventHandler<ActionEvent>() {
      @Override public void handle(ActionEvent t) {
        selection.setText(ZORK);
    menuButton.getItems().setAll(
            frobozzItem,
            zorkItem
  class SizingMenuItem extends CustomMenuItem {
    static final double BUFFER_WIDTH = 14; // to account for the width of the padding around menu items.
    SizingMenuItem(final MenuButton menuButton, String string) {
      super();
      Text   text      = new Text(string);
      Double textWidth = text.getBoundsInParent().getWidth();
      Shape  padding = new Rectangle(
              textWidth,
              0,
              menuButton.getWidth() - textWidth - BUFFER_WIDTH,
              2
      padding.setFill(Color.TRANSPARENT);
      Label label = new Label(string, padding);
      label.setContentDisplay(ContentDisplay.RIGHT);
      label.setGraphicTextGap(0);
      setContent(label);
}

Similar Messages

  • XML sigh

    Hey, I've beening sitting here for 4 hours now staring at api's and online help guides about how to read in XML, maybe I'm just having bad luck. But this is what my XML document looks like.
    <?xml version="1.0"?>
    <Program>
    <menu name="Selection1 abc="yes" required="yes" display="0">
    <item name="Item 1"/>
    <item name="Item 2"/>
    <item name="Item 3"/>
    <item name="Item 4"/>
    <item name="Item 5"/>
    <item name="Item 6"/>
    </menu>
    <menu name="Selection2" abc="yes" required="yes" display="0">
    <item name="Item 1"/>
    <item name="Item 2"/>
    <item name="Item 3"/>
    <item name="Item 4"/>
    <item name="Item 5"/>
    <item name="Item 6"/>
    </menu>
    </Program>
    Except in the real one there are about 8900 lines of code :( So going through by hand and trying to change the format to look like how I see them in the tutorials will take forever.
    The basic Idea is I want to be able in the final project pick something in a gui and have it call a class and will tell it to search the xml document and pull up all of the Item 1..2..3.etc's contained under which Selection I am looking for. Heres what I do have, I threw out the rest because it simply is no help, this is whats left of the turotial one I was modifying.
    import java.io.File;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class RWXML{
    public static void main (String argv []){
    try {
         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
         Document doc = docBuilder.parse (new File("RedWineData.xml"));
         // normalize text representation
         doc.getDocumentElement().normalize();
         NodeList listOfmenus = doc.getElementsByTagName("menu");
         int totalmenus = listOfmenus.getLength();
         System.out.println("Total Number of Menus: " + totalmenus);
         for(int s=0; s<listOfmenus.getLength() ; s++){
    // What do I put here so that I can actully check the
    // name = vs whatever selection im checking for, and then how
    // do i pull up the subsiquent name of each Item contiained
    // under the Selection.
         }//end of for loop with s var
         }catch (SAXParseException err) {
              System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
              System.out.println(" " + err.getMessage ());
         }catch (SAXException e) {
              Exception x = e.getException ();
              ((x == null) ? e : x).printStackTrace ();
         }catch (Throwable t) {
              t.printStackTrace ();
         //System.exit (0);
    }//end of main
    I'm completely out of ideas, if anyone could help me, that would be awsome.

    first of, when you are parsing large amounts of data, use sax parsing. Dom will try to load the complete doc in memory, and that could become a bit large.
    Having said that, lets look at some sample code
    public class ReadMenus extends DefaultHandler {
       private Menu menu;
       private MenuItem menuItem
       private List program;
       public List parse (String xmlFile) throws IOException, SAXException {
          XMLReader xr = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" );
          xr.setContentHandler( this );
          FileReader r = new FileReader( xmlFile );
          xr.parse( new InputSource( r ) );
          return program;
       public void startDocument () {
          program = new ArrayList();
       public void endDocument () {
       public void startElement ( String uri, String name, String qName, Attributes atts ) throws SAXException {
          String nameValue = atts.getValue( "name" );
          System.out.println( "New element " + qName + "(" + nameValue + ")" );
          if ( qName.equals( "menu" ) ) {
             menu = new Menu();
             menu.setName( atts.getValue( "name" ) );
             if ( atts.getValue("abc") != null ) {
                menu.setAbc( atts.getValue("abc") );
             if ( atts.getValue( "default" ) != null && atts.getValue( "default" ).equals( "yes" ) ) {
                menu.setRequired(true);
             else {
                menu.setRequired(false);
          else if ( qName.equals( "item" ) ) {
             menuItem = new MenuItem();
             menuItem.setName( atts.getValue( "name" ) );
       public void endElement ( String uri, String name, String qName ) {
          if ( qName.equals( "menu" ) ) {
             program.add( menu );
             menu = null;
          else if ( qName.equals( "item" ) ) {
             menu.add( menuItem );
             menuItem = null;
       public void characters ( char ch[], int start, int length ) {
    Now you can use
    ReadMenus rm = new ReadMenus();
    Program program = rm.parse("yourXmlFile.xml");
    for (int i=0; i<program.size(); i++ ) {
       Menu menu = (Menu) program.get(i);
       for (int j=0; j<menu.size(); j++) {
          MenuItem menuItem = (MenuItem) menu.get(j);
          // do your things
    }Just keep in mind, that you still have to define your Menu and MenuItem class.
    hope this helps

  • JInternalFrame size issue

    I'm trying to make an IDE, and have started trying to create a nopepad type editor. My problem occurs when clicking new to create a new internal frame, the frame is created to be the same size as a maximised internal frame would be. I've tryed adding setBounds, setSize, setPreferredSize, setMaximumSize, setMinimumSize functions to the frame, but to no avail. This is the full listing of my code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.text.*;
       Java IDE (Integrated Development Environment)
       IDE.java
       Sets up constants and main viewing frame.
       Advanced 2nd Year HND Project
       @author Mark A. Standen
       @Version 0.2 18/04/2002
    //=========================================================
    //   Main (public class)
    //=========================================================
    public class IDE extends JFrame
          Application Wide Constants
       /**   The Name of the Application   */
       private static final String APPLICATION_NAME = "Java IDE";
       /**   The Application Version   */
       private static final String APPLICATION_VERSION = "0.2";
       /**   The Inset from the edges of the screen of the main viewing frame   */
       private static final int INSET = 50;
       /**   The main frame   */
       private static IDE frame;
          MAIN
       public static void main (String[] Arguments)
          //Adds Cross-Platform functionality by adapting GUI
          try
             UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
             //Adapts to current system look and feel - e.g. windows
          catch (Exception e) {System.err.println("Can't set look and feel: " + e);}
          frame = new IDE();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setVisible(true);
          This Constructor creates an instance of Main, the main view frame.
          @param sizeX Width of the main view Frame in pixels
          @param sizeY Height of the main view Frame in pixels
       public IDE()
          super (APPLICATION_NAME + " (Version " + APPLICATION_VERSION + ")");
          Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
          this.setBounds( INSET, INSET, screenSize.width - (INSET * 2), screenSize.height - (INSET * 3) );
          JDesktopPane mainPane = new JDesktopPane();
          mainPane.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
          this.setContentPane(mainPane);
          this.getContentPane().setLayout( new BorderLayout() );
          this.getContentPane().add("North", new ToolBar() );
    //===================================================================
    //   ToolBar (private class)
    //===================================================================
       private class ToolBar extends JToolBar implements ActionListener
          /*   Create toolbar buttons   */
          private JButton newBox;
          private JButton load;
          private JButton save;
             Creates an un-named toolbar,
             with New, Load, and Save options.
          public ToolBar () {
                Use to make toolbar look nice later on
                ImageIcon imageNew = new ImageIcon("imgNew.gif");
                JButton toolbarNew = new JButton(imageNew);  
                ImageIcon imageLoad = new ImageIcon("imgLoad.gif");
                JButton toolbarLoad = new JButton(imageLoad);  
                ImageIcon imageSave = new ImageIcon("imgSave.gif");
                JButton toolbarSave = new JButton(imageSave);
                temp toolbar buttons for now
             newBox = new JButton("New");
             load = new JButton("Load");
             save = new JButton("Save");
             this.setFloatable(false);
             this.setOrientation(JToolBar.HORIZONTAL);
             this.add(newBox);
             this.add(load);
             this.add(save);
             newBox.addActionListener(this);
             load.addActionListener(this);
             save.addActionListener(this);
             Checks for button presses, and calls the relevant functions
          public void actionPerformed (ActionEvent event)
             Object source = event.getSource();
             /*   If new has been clicked   */
             if (source == newBox)
                TextDisplayFrame textBox = new TextDisplayFrame();
                Rectangle rect = this.getParent().getBounds();
                textBox.setBounds( rect.x - INSET, rect.y - INSET, rect.width - (INSET * 2), rect.height - (INSET * 2) );
                this.getParent().add(textBox);
                textBox.setVisible(true);
             /*   If load has been clicked   */
             else if (source == load)
                TextDisplayFrame textBox = new TextDisplayFrame();
                frame.getContentPane().add(textBox);
                System.out.println(textBox + "");
                textBox.loadDoc();
             /*   If save has been clicked   */
             else if (source == save)
    //====================================================================
    //   Menu (private class)
    //====================================================================
       private class Menu extends JMenu
          public Menu()
             JMenuBar menuBar = new JMenuBar();
             JMenu menu = new JMenu("Document");
             menu.setMnemonic(KeyEvent.VK_D);
             JMenuItem menuItem = new JMenuItem("New");
             menuItem.setMnemonic(KeyEvent.VK_N);
             menuItem.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                      TextDisplayFrame textBox = new TextDisplayFrame();
                      //this.getContentPane().add(textBox);
             menu.add(menuItem);
             menuBar.add(menu);
             menuBar.setVisible(true);
    //====================================================================
    //   TextDisplayFrame (private class)
    //====================================================================
       private class TextDisplayFrame extends JInternalFrame
          /**   The Default Title of an internal pane   */
          private static final String DEFAULT_TITLE = "untitled";
          /**   Path to the current File   */
          private File filePath = new File ("C:" + File.separatorChar + "test.txt");
          /*   Swing Components   */
          private JTextArea mainTextArea;
          private JScrollPane scrollPane;
             Creates a TextDisplayFrame with the given arguments
             @param title Title of the TextDisplayFrame
          public TextDisplayFrame(String title)
             super(title, true, true, true, true); //creates resizable, closable, maximisable, and iconafiable internal frame
             this.setContentPane( textBox() );
             this.setPreferredSize( new Dimension (150, 100) );
             this.setMaximumSize( new Dimension (300, 300) );
             this.setVisible(true);
             Creates a resizable frame with the default title
          public TextDisplayFrame()
             this(DEFAULT_TITLE);
             Creates a blank, resizable central text area, for the entering of text
             @return Returns a JPanel object
          private JPanel textBox()
             mainTextArea = new JTextArea( new PlainDocument() );
             mainTextArea.setLineWrap(false);
             mainTextArea.setFont( new Font("monospaced", Font.PLAIN, 14) );
             scrollPane = new JScrollPane( mainTextArea );
             JPanel pane = new JPanel();
             BorderLayout bord = new BorderLayout();
             pane.setLayout(bord);
             pane.add("Center", scrollPane);
             return pane;
             @return Returns a JTextComponent to be used as document object
          public JTextComponent getDoc()
             return mainTextArea;
          public void loadDoc()
             /* Create blank Document */
             Document textDoc = new PlainDocument();
             /* Attempt to load the document in the filePath into the blank Document object*/
             try
                Reader fileInput = new FileReader(filePath);
                char[] charBuffer = new char[1000];
                int numChars;
                while (( numChars = fileInput.read( charBuffer, 0, charBuffer.length )) != -1 )
                   textDoc.insertString(textDoc.getLength(), new String( charBuffer, 0, numChars ), null);
             catch (IOException error) {System.out.println(error); }
             catch (BadLocationException error) {System.out.println(error); }
             /* Set the loaded document to be the text of the JTextArea */
             this.getDoc().setDocument( textDoc );
    }I would appreciate all/any help that can be offered.

    i have tried out your source and have made some modifications and now it works fine.
    move the desktoppane to be a private variable of the class, so that you can add the InternalFrame to it directly. also the setBounds() needs to be given lil' corrections to c that the InternalFrame appear on the visible area.
    i'm posting entire source just to make sure you don't confuse abt the changes. This is a working version. Hope it serves.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.text.*;
    Java IDE (Integrated Development Environment)
    IDE.java
    Sets up constants and main viewing frame.
    Advanced 2nd Year HND Project
    @author Mark A. Standen
    @Version 0.2 18/04/2002
    //=========================================================
    // Main (public class)
    //=========================================================
    public class IDE extends JFrame
    Application Wide Constants
    /** The Name of the Application */
    private static final String APPLICATION_NAME = "Java IDE";
    /** The Application Version */
    private static final String APPLICATION_VERSION = "0.2";
    /** The Inset from the edges of the screen of the main viewing frame */
    private static final int INSET = 50;
    /** The main frame */
    private static IDE frame;
    /*********** CHANGED HERE ****************/
    private JDesktopPane mainPane;
    /*********** END CHANGE ****************/
    MAIN
    public static void main (String[] Arguments)
    //Adds Cross-Platform functionality by adapting GUI
    try
    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
    //Adapts to current system look and feel - e.g. windows
    catch (Exception e) {System.err.println("Can't set look and feel: " + e);}
    frame = new IDE();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    This Constructor creates an instance of Main, the main view frame.
    @param sizeX Width of the main view Frame in pixels
    @param sizeY Height of the main view Frame in pixels
    public IDE()
    super (APPLICATION_NAME + " (Version " + APPLICATION_VERSION + ")");
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    this.setBounds( INSET, INSET, screenSize.width - (INSET * 2), screenSize.height - (INSET * 3) );
              /*********** CHANGED HERE ****************/
    mainPane = new JDesktopPane();
    mainPane.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    //this.setContentPane(mainPane);
    this.getContentPane().setLayout( new BorderLayout() );
    this.getContentPane().add(new ToolBar(), java.awt.BorderLayout.NORTH);
         this.getContentPane().add(mainPane, java.awt.BorderLayout.CENTER);
         /*********** END CHANGE ****************/
    //===================================================================
    // ToolBar (private class)
    //===================================================================
    private class ToolBar extends JToolBar implements ActionListener
    /* Create toolbar buttons */
    private JButton newBox;
    private JButton load;
    private JButton save;
    Creates an un-named toolbar,
    with New, Load, and Save options.
    public ToolBar () {
    Use to make toolbar look nice later on
    ImageIcon imageNew = new ImageIcon("imgNew.gif");
    JButton toolbarNew = new JButton(imageNew);
    ImageIcon imageLoad = new ImageIcon("imgLoad.gif");
    JButton toolbarLoad = new JButton(imageLoad);
    ImageIcon imageSave = new ImageIcon("imgSave.gif");
    JButton toolbarSave = new JButton(imageSave);
    temp toolbar buttons for now
    newBox = new JButton("New");
    load = new JButton("Load");
    save = new JButton("Save");
    this.setFloatable(false);
    this.setOrientation(JToolBar.HORIZONTAL);
    this.add(newBox);
    this.add(load);
    this.add(save);
    newBox.addActionListener(this);
    load.addActionListener(this);
    save.addActionListener(this);
    Checks for button presses, and calls the relevant functions
    public void actionPerformed (ActionEvent event)
    Object source = event.getSource();
    /* If new has been clicked */
    if (source == newBox)
    TextDisplayFrame textBox = new TextDisplayFrame();
    Rectangle rect = mainPane.getBounds();
    /*********** CHANGED HERE ****************/
    //textBox.setBounds( rect.x - INSET, rect.y - INSET, rect.width - (INSET * 2), rect.height - (INSET * 2) );
    //this.getParent().add(textBox);
    mainPane.add(textBox, javax.swing.JLayeredPane.DEFAULT_LAYER);
    textBox.setBounds(rect.x, rect.y, 500, 500);
    /*********** END CHANGE ****************/
    textBox.setVisible(true);
    /* If load has been clicked */
    else if (source == load)
    TextDisplayFrame textBox = new TextDisplayFrame();
    frame.getContentPane().add(textBox);
    System.out.println(textBox + "");
    textBox.loadDoc();
    /* If save has been clicked */
    else if (source == save)
    //====================================================================
    // Menu (private class)
    //====================================================================
    private class Menu extends JMenu
    public Menu()
    JMenuBar menuBar = new JMenuBar();
    JMenu menu = new JMenu("Document");
    menu.setMnemonic(KeyEvent.VK_D);
    JMenuItem menuItem = new JMenuItem("New");
    menuItem.setMnemonic(KeyEvent.VK_N);
    menuItem.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    TextDisplayFrame textBox = new TextDisplayFrame();
    //this.getContentPane().add(textBox);
    menu.add(menuItem);
    menuBar.add(menu);
    menuBar.setVisible(true);
    //====================================================================
    // TextDisplayFrame (private class)
    //====================================================================
    private class TextDisplayFrame extends JInternalFrame
    /** The Default Title of an internal pane */
    private static final String DEFAULT_TITLE = "untitled";
    /** Path to the current File */
    private File filePath = new File ("C:" + File.separatorChar + "test.txt");
    /* Swing Components */
    private JTextArea mainTextArea;
    private JScrollPane scrollPane;
    Creates a TextDisplayFrame with the given arguments
    @param title Title of the TextDisplayFrame
    public TextDisplayFrame(String title)
    super(title, true, true, true, true); //creates resizable, closable, maximisable, and iconafiable internal frame
    this.setContentPane( textBox() );
    this.setPreferredSize( new Dimension (150, 100) );
    /*********** CHANGED HERE ****************/
    //this.setMaximumSize( new Dimension (300, 300) );
    this.setNormalBounds(new Rectangle(300,300));
    /*********** END CHANGE ****************/
    this.setVisible(true);
    Creates a resizable frame with the default title
    public TextDisplayFrame()
    this(DEFAULT_TITLE);
    Creates a blank, resizable central text area, for the entering of text
    @return Returns a JPanel object
    private JPanel textBox()
    mainTextArea = new JTextArea( new PlainDocument() );
    mainTextArea.setLineWrap(false);
    mainTextArea.setFont( new Font("monospaced", Font.PLAIN, 14) );
    scrollPane = new JScrollPane( mainTextArea );
    JPanel pane = new JPanel();
    BorderLayout bord = new BorderLayout();
    pane.setLayout(bord);
    pane.add("Center", scrollPane);
    return pane;
    @return Returns a JTextComponent to be used as document object
    public JTextComponent getDoc()
    return mainTextArea;
    public void loadDoc()
    /* Create blank Document */
    Document textDoc = new PlainDocument();
    /* Attempt to load the document in the filePath into the blank Document object*/
    try
    Reader fileInput = new FileReader(filePath);
    char[] charBuffer = new char[1000];
    int numChars;
    while (( numChars = fileInput.read( charBuffer, 0, charBuffer.length )) != -1 )
    textDoc.insertString(textDoc.getLength(), new String( charBuffer, 0, numChars ), null);
    catch (IOException error) {System.out.println(error); }
    catch (BadLocationException error) {System.out.println(error); }
    /* Set the loaded document to be the text of the JTextArea */
    this.getDoc().setDocument( textDoc );

  • Is it possible to change the size of the 'Close' button in Full Screen viewing mode?

    I am currently using Firefox for a kiosk type scenario. We require that the browser run full screen. The issue is that the 'Close' button is not large enough for users to consistently see, so they're having issues figuring out how to close an active browser window.
    Can anyone tell me if it's possible to change this icon? I've tried using themes, but they tend to theme everything but the close button.
    Custom configuration details are below.
    Firefox version: firefox-3.0.4-1.el5.centos
    Customisations:
    Access to local drives disabled:
    Modified the contents of /usr/lib/firefox-3.0.4/chrome/browser.jar, so that browser.js has the added stanza:
    <pre><nowiki>if (location.match(/^file:/) ||
    location.match(/^\//) ||
    location.match(/^resource:/) ||
    (!location.match(/^about:blank/) &&
    location.match(/^about:/))) {
    loadURI("about:blank");
    }</nowiki></pre>
    Various menus & bookmarks disabled in chrome/userChrome.css
    <pre><nowiki>/* Kill "normal" bookmark icons in the bookmarks menu */
    menuitem.bookmark-item > .menu-iconic-left {
    display: none;
    /* kill icons for bookmark folders in Bookmarks menu */
    menu.bookmark-item > .menu-iconic-left {
    display: none;
    /* kill icons for bookmark groups in Bookmarks menu */
    menuitem.bookmark-group > .menu-iconic-left {
    display: none;
    /* Remove the Edit and Help menus
    Id's for all toplevel menus:
    file-menu, edit-menu, view-menu, go-menu, bookmarks-menu, tools-menu, helpMenu */
    helpMenu { display: none !important; }
    tools-menu { display: none !important; }
    file-menu { display: none !important; }
    edit-menu { display: none !important; }
    view-menu { display: none !important; }
    go-menu { display: none !important; }
    bookmarks-menu { display: none !important; }
    #autohide-context { display: none !important;}
    #bookmarksToolbarFolderMenu { display: none !important;}
    #organizeBookmarksSeparator { display: none !important;}
    .tabbrowser-tabs .tab-icon {
    display: none;
    #urlbar {
    font-family: Arial !important;
    color: Black !important;
    font-size: 26 !important; }</nowiki></pre>

    Try code like this:
    <pre><nowiki>#window-controls .toolbarbutton-icon {
    width: 25px !important;
    height: 25px !important;
    </nowiki></pre>
    The three buttons have these IDs:
    <pre><nowiki>#minimize-button
    #restore-button
    #close-button</nowiki></pre>

  • How to set a frame size

    Hi
    I am tring to create a window with some menus on it. I have set a size to the window as (400,400). The trouble is when the application is run a small sized window is displayed on the top left corner as opposed to a 400*400 window. Although I can drag the widow to expand it, I was wondering if there was a way to set window's size.
    Any help is greatly appreciated.
    Thanks in advance
    * GUI.java
    package pick;
    import java.awt.Frame;
    import java.awt.Menu;
    import java.awt.MenuBar;
    import java.awt.MenuItem;
    import java.awt.Panel;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import Drawing2d.*;
    * @author venkat
    public class GUI{
        public Frame frame = new Frame();
        boolean partButtons = false;
        Pick1 pick1;
         Sketch sketch;
    //   JOptionPane AB = new JOptionPane("sgadfg ",javax.swing.JOptionPane.PLAIN_MESSAGE);
    //   java.awt.Dialog AboutD =new java.awt.Dialog(frame);
        public GUI(){
            //Menubar
            MenuBar mb = new MenuBar();
            //Menus
            Menu File = new Menu("File");
    //      File.setLabel("File");
            mb.add(File);
            Menu Edit = new Menu();
            Edit.setLabel("Edit");
            mb.add(Edit);
            Menu View = new Menu();
            View.setLabel("View");
            mb.add(View);
                Menu Orient = new Menu();
                Orient.setLabel("Orient");
                View.add(Orient);
            Menu Insert = new Menu();
            Insert.setLabel("Insert");
            mb.add(Insert);
            Menu Help = new Menu();
            Help.setLabel("Help");
            mb.add(Help);       
            frame.setSize(400,400);
            frame.pack();
            frame.setVisible(true);
            frame.addWindowListener(new MyWindowListener());
    class MyWindowListener implements WindowListener {
    //Do nothing methods required by interface
    public void windowActivated(WindowEvent e) {}
    public void windowDeactivated(WindowEvent e) {}
    public void windowIconified(WindowEvent e) {}
    public void windowDeiconified(WindowEvent e) {}
    public void windowOpened(WindowEvent e) {}
    public void windowClosed(WindowEvent e) {}
    //override windowClosing method to exit program
    public void windowClosing(WindowEvent e) {
        System.exit(0); //normal exit
    }

            frame.setSize(400,400);
            //frame.pack();//<----------------
            frame.setVisible(true);

  • Why can't change font of accelerator for menuitem by using setFont()

    the method setFont() doesn't change the font of accelerator of menuitem, only it's left part text 's font is changed, how can i change
    the font of the accelerator? Anyone can help me?

    Thanks very much VikingOSX
    This solved my issue, but then I realised I have another. I'd like to be able to expand the size of the notes I can make. Perhaps there is another way in which I can get what I am after...?
    Basically, I'd like to link a text box to a word(s) and be able to easily toggle between that text box being visible and hidden. The reason why is for chord charts/tablatures for music alongside lyrics. I'd like the lyrics and the chord chart/tablature to fit into the same file but I don't want to see the chords/tablature all the time. Only when I need to reference them.
    Do you know if this is possible in either version of Pages?
    Thanks

  • How to do I increase the font size inside the drop down menus?

    I am trying to enlarge the default font size of the drop down menus that appear when you use the items in the menu bar. For example, I want to increase the font size used in the list that appears under "bookmarks." I do not trying to do anything other than this. Theme and Font size changer does not do this.

    Can you clarify with a screenshot which for items you want to change the font size?
    I use this code on Linux for some font sizes:
    <pre><nowiki>/* font-size: sidebar */
    #commonDialog *, #sidebar-box *, #bookmarksPanel *, #history-panel *{ font-size:11pt!important; }
    /* font-size: Bookmarks */
    #bookmarksBarContent menuitem.bookmark-item,
    #bookmarksMenuPopup menu,
    #bookmarksMenuPopup menuitem { font-size:11pt!important; }
    /* font-size: search bar,autohide */
    #search-container .textbox-input-box {font-size:0px!important}
    #search-container .searchbar-textbox:hover .textbox-input-box,
    #search-container .searchbar-textbox[focused="true"] .textbox-input-box { font-size:12pt!important; font-family:"DejaVu Sans Mono"; }
    /* font-size: navigator toolbox */
    #navigator-toolbox menupopup menu, #navigator-toolbox menupopup menuitem { font-size:12px!important; }</nowiki></pre>

  • [SOLVED]makepkg modifies binary - different size in source tar/package

    I'm using the following extremely straightforward PKGBUILD to try and package livestreamer-twitch-gui:
    # Maintainer: Ben Fox-Moore <[email protected]>
    pkgname=livestreamer-twitch-gui
    pkgver=v0.7.1
    pkgrel=1
    pkgdesc="A multi platform Twitch.tv browser for Livestreamer"
    arch=('x86_64')
    url="https://github.com/bastimeyer/livestreamer-twitch-gui"
    license=('MIT')
    depends=("livestreamer")
    provides=('livestreamer-twitch-gui')
    source_x86_64=("https://github.com/bastimeyer/livestreamer-twitch-gui/releases/download/$pkgver/livestreamer-twitch-gui-$pkgver-linux64.tar.gz")
    sha256sums_x86_64=('b9350224f04c0028f87bd852f7f0aca2017000a07ec95fbbacbf49fe2b564ca7')
    package() {
    cd "$srcdir/$pkgname"
    install -d "$pkgdir/usr/share/$pkgname"
    cp -R * "$pkgdir/usr/share/$pkgname"
    however when I compare the size of files in the source tar livestreamer-twitch-gui-v0.7.1-linux64.tar.gz:
    $ tar -ztvf livestreamer-twitch-gui-v0.7.1-linux64.tar.gz
    drwxr-xr-x 0/0 0 2015-02-10 19:00 livestreamer-twitch-gui/
    -rwxr-xr-x 0/0 979 2015-02-10 18:59 livestreamer-twitch-gui/add-menuitem.sh
    -rw-r--r-- 0/0 10485568 2015-02-10 18:59 livestreamer-twitch-gui/icudtl.dat
    -rwxr-xr-x 0/0 4678264 2015-02-10 18:59 livestreamer-twitch-gui/libffmpegsumo.so
    -rwxr-xr-x 0/0 73325950 2015-02-10 18:59 livestreamer-twitch-gui/livestreamer-twitch-gui
    -rw-r--r-- 0/0 5770140 2015-02-10 18:59 livestreamer-twitch-gui/nw.pak
    -rwxr-xr-x 0/0 450 2015-02-10 18:59 livestreamer-twitch-gui/remove-menuitem.sh
    -rwxr-xr-x 0/0 1258 2015-02-10 18:59 livestreamer-twitch-gui/start.sh
    with those in the generated package tar livestreamer-twitch-gui-v0.7.1-1-x86_64.pkg.tar.xz
    $ tar -Jtvf livestreamer-twitch-gui-v0.7.1-1-x86_64.pkg.tar.xz
    -rw-r--r-- root/root 624 2015-03-08 00:34 .PKGINFO
    -rw-r--r-- root/root 1286 2015-03-08 00:34 .MTREE
    drwxr-xr-x root/root 0 2015-03-08 00:34 usr/
    drwxr-xr-x root/root 0 2015-03-08 00:34 usr/share/
    drwxr-xr-x root/root 0 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/
    -rw-r--r-- root/root 5770140 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/nw.pak
    -rwxr-xr-x root/root 450 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/remove-menuitem.sh
    -rwxr-xr-x root/root 1264280 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/libffmpegsumo.so
    -rwxr-xr-x root/root 1258 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/start.sh
    -rwxr-xr-x root/root 72547728 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/livestreamer-twitch-gui
    -rwxr-xr-x root/root 979 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/add-menuitem.sh
    -rw-r--r-- root/root 10485568 2015-03-08 00:34 usr/share/livestreamer-twitch-gui/icudtl.dat
    you can see that both livestreamer-twitch-gui and libffmpegsumo.so have different sizes in the generated package from the source tar. Everything else stays the same. Obviously this causes issues when trying to install and run the package. Any ideas what might be causing this problem? Thanks!
    Last edited by InfernoZeus (2015-03-08 00:46:00)

    Thanks for the super prompt reply! Adding the no strip option solved my problem perfectly
    I did look at trying to split up the binaries/libraries/etc. but that's complicated by the libudev.so.0 issue. The source tar includes a script to solve the issue, but it expects the real binary to be in the same folder. There's also a couple of scripts and additional files that are looked for right next to the binary. I think for now I'll just move it all to /opt/$pkgname.
    Thanks again.
    Last edited by InfernoZeus (2015-03-08 00:45:36)

  • REP 1219 object has no size error? when using a character report

    REP-1219 'Margin' has no size- length or width
    I searched on metalink, otn, and dejanews for this. I saw a variety of responses none are helpful. I am a forms person and do not know reports well.
    This error happens when I try to change a report to character mode. My client wants to be able to view reports in excel. To do this, I need to change them to client mode.
    I read places that I am supposed to change the font of all objects to fix this? How? I brought up the layout model. Clicked select and changed the font and size. Did not help?
    How do I resize objects in report? I look in the property pallete of items under 'Margin' and I dont see any properties for size. I go to the layout model and try to size things and I cannot drag anything.
    I tried using the convert utility that someone recommended. This did not work.
    Please be thorough in your explanation and understand that I have read the existing notes about this problem.

    Hi Ryan,
    Firstly you should understand that Reports is a bitmapped reporting tool (think 600-1200 dots per inch laser printer), so when you run under character mode, Reports is taking objects that are sizable to the laser printer pixel and mapping them onto a much, much less granular character grid (e.g., 70x54 grid). So, a report designed for bitmapped may have many objects where after rounding to the character grid the object ends up being a line or single point in the character grid, making it have zero size...and you get the error when that happens.
    You can see how your report looks in the character unit grid by following the steps in the help topic "Setting properties for an ASCII (character-mode) report". You'll want to adjust your layout objects to snap to the grid points of the character grid. You'll also want to use a font that comes closest to the character grid; you can do an Edit->Select All, and then choose, say, Courier, Regular, 12 point.
    To get to the objects in the margin area of the report, choose View->Layout Section->Edit Margin. This will put the layout editor in a mode for manipulating only the margin objects. You can see the objects in the body area of the report, but you can't edit them. Then click this menuitem again to go back to editing the objects in the body of the layout.
    Hope this helps...
    regards,
    Stewart

  • Can't set size of JFrame

    Hello all,
    I'd love it if someone could help me with something that has been frustrating me for a couple of days now: I've been trying to set tht screen size of a JFrame using the setSize method, but it just doesn't work. I must be missing something. I've attached the code below... if you can see the reason for the, please let me know. Sorry, the code is a bit messy and there aren't many comments- this was just a test program to get used to swing/awt :o(
    Thanks!
    SegFault Soul.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * A stupid class that displays a window with some numbers that can be
    * changed using the menus.
    public class Windo
        private JFrame frame;
        private JLabel label;
        private JLabel label2;
        private int targetArea;
        public static void main(String[] args) {
            new Windo();
         * Create a Windo show it on screen.
        public Windo()
            targetArea = 1;
            makeFrame();
         * Create the Swing frame and its content.
        private void makeFrame()
            frame = new JFrame("Windo");
            frame.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
            Container contentPane = frame.getContentPane();
            contentPane.setLayout(new FlowLayout());
            label = new JLabel("0");
            contentPane.add(label);
            label2 = new JLabel("0");
            contentPane.add(label2);
            makeMenuBar(frame, label);
            frame.pack();
            frame.setVisible(true);
        private void makeMenuBar(JFrame frame, JLabel label)
            JMenuBar menuBar = new JMenuBar();
            frame.setJMenuBar(menuBar);
            JMenu numberMenu = new JMenu("Numbers");
            menuBar.add(numberMenu);
            JMenuItem menuItem = new JMenuItem("ONE");
            menuItem.addActionListener(new ActionListener() {
                                   public void actionPerformed(ActionEvent e) { setLabelValue("1"); }
            numberMenu.add(menuItem);
            menuItem = new JMenuItem("TWO");
            menuItem.addActionListener(new ActionListener() {
                                   public void actionPerformed(ActionEvent e) { setLabelValue("2"); }
            numberMenu.add(menuItem);
            JMenu areaMenu = new JMenu("Area");
            menuBar.add(areaMenu);
            ButtonGroup group = new ButtonGroup();
            JRadioButtonMenuItem rbMenuItem = new JRadioButtonMenuItem("Area 1");
            rbMenuItem.setSelected(true);
            group.add(rbMenuItem);
            rbMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) { setTargetArea(1); }
            areaMenu.add(rbMenuItem);
            rbMenuItem = new JRadioButtonMenuItem("Area 2");
            rbMenuItem.setSelected(false);
            group.add(rbMenuItem);
            rbMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) { setTargetArea(2); }
            areaMenu.add(rbMenuItem);       
        private void setLabelValue(String num)
            if(targetArea == 1){
                label.setText(num);
            else if (targetArea == 2){
                label2.setText(num);
        private void setTargetArea(int newTargetArea)
            targetArea = newTargetArea;
        public static final int DEFAULT_WIDTH = 500;
        public static final int DEFAULT_HEIGHT = 500;
    }

    Try this order:
            contentPane.setLayout(new FlowLayout());
            JPanel panel = new JPanel();
            panel.setLayout(new FlowLayout());
            label = new JLabel("0");
            label2 = new JLabel("0");
            panel.add(label);
            panel.add(label2);
            panel.setBackground(Color.WHITE); // So you can see what's happening.
            contentPane.add(panel);
            makeMenuBar(frame, label);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  // Makes life simpler
            frame.pack();
            frame.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
            frame.setVisible(true);
            panel.setSize(100,100);

  • MenuItem not render icon

    Hi
    I created a menu from a taskFlow adf unbounded.
    Select an icon that is in the images folder of my application.
    The code of the menu is as follows:
    <? Xml version = "1.0" encoding = "windows-1252"?>
    <Menu xmlns = "http://myfaces.apache.org/trinidad/menu">
      <ItemNode id = "loginPageId" label = "Login" action = "actionlogin" focusViewId = "/loginPage" icon = "../../../../../images/application/components/login/menu/glbl_login_msg.gif "/>
    </ Menu>
    From a PageTemplate I called the menu as shown in the following code.
    <Af: navigationPane id = "pt_np2" var = "menuItem"
       hint = "buttons"
       inlineStyle = "margin: 0px 0px 20px 0px;"
       value = "# {menu_login}">
      <F: facet name = "nodeStamp">
         <Af: commandNavigationItem id = "Item"
               rendered = "# {menuItem.rendered}"
               icon = "# {menuItem.icon}"
               immediate = "true" />
               action = "# {menuItem.doAction}"
               partialSubmit = "false"
               textAndAccessKey = "# {menuItem.label}"
               inlineStyle = "font-size: small; font-weight: bold; Color: ButtonText; margin: 0px 0px 0px 2px;"
      </ F: facet>
    </ Af: navigationPane>
    The problem is that not show the glbl_login_msg.gif itemNode icon.
    Can you tell me some solution.
    Regards
    Raul

    Hi Timo
    Thank you very much for your answer.
    I miss some testing:
    In the property menu icon of the route ../../../../../AB6632.gif jdeveloper the default set.
    I have deleted the ../../../ of the route and now if displayed.
    The menu set from the Unbounded Task Flow was generated .jspx pages.
    The default path established jdeveloper in this menu for the same file location on the icon property is:
    icon = "../../../../../images /glbl_login_msg.gif"
    I created another Unbounded Task Flow but .jsf pages.
    I then created another menu from this new Unbounded Task Flow.
    The default path established jdeveloper in this menu for the same file location is:
    icon = "../images/glbl_login_msg.gif"
    Thank you very much for your help Timo.
    Regards
    Raul

  • 2x2GHz G5 2004 HD Size Limitation

    Hello everyone,
    I am a bit confused about the exact model of my PowerMac G5 and I want to buy a second HD. I remember, that there was some limitation for the HD size - 2x250 or so?
    I also want to ask if this drive would work on my machine and is it a good choice at all: Western Digital RAPTOR X WD1500AHFD - 150GB, 10000 U/min, 16MB Level2 Cache, 3.5zoll, SATA150, 5.2 ms
    I would be really happy if you can give me other tips - I am really running out of space
    Here is my hardware overview:
    Machine Name: Power Mac G5
    Machine Model: PowerMac7,3
    CPU Type: PowerPC G5 (2.2)
    Number Of CPUs: 2
    CPU Speed: 2 GHz
    L2 Cache (per CPU): 512 KB
    Memory: 2 GB
    Bus Speed: 1 GHz
    Boot ROM Version: 5.1.8f7
    Thank you!
    Milen
    PowerMac G5 Dual 2Ghz   Mac OS X (10.4.6)  

    Milen,
    I have just last week installed a MAXTOR DimondMax 10 (http://maxtor.com/portal/site/Maxtor/menuitem.ba88f6d7cf664718376049b291346068/? channelpath=/en_us/Products/Desktop%20Storage/DiamondMax%20Family/DiamondMax%201 0) in a 300GB, 16MB Cache, SATA/150, 7200 RPM configuration.
    The HD runs alongside the original HD (200GB) that came with my G5 (same specs as yours except for RAM, I have 1GB).
    I have experienced no issues or problems related to the size of the HDs.
    Hope this helps.
    G5   Mac OS X (10.4.3)  
    G5   Mac OS X (10.4.3)  

  • UWL: Size of the "forward"-Window

    Hi,
    how can I change the size  of the forward window, where i choose people for fowarding?
    It is a little bit to big...
    Thanks!
    Natalya

    Hi Raghu,
    I have work items, which i can forward to other colleagues. For this issue  there is an action "forward" in the uwl:
      <Menu>
      <MenuItem name="forward" actionRef="forward" referenceBundle="forward"/>
      </Menu>
    If you go to this link in the menu of the work item, you get an extra window with the choice of your  colleagues. This window is to big, therefore i want make it smaller.
    Kind regards
    Natalya

  • [Solved]XFCE 4.8 - Odd problem with terminal size.

    I've been using Xfce for nearly two months now, and am enjoying it quite a bit.   However last night an odd, and annoying, problem cropped up that I can't seem to figure out.
    For the main font I'm using Sans.   If I set it to 9 (which is what I would like as default size) it makes my terminal emulators open with 70x21 instead of 80x24.   When I check out ~/.config/Terminal/terminalrc, it still has 80x24 as its settings.   I use Terminator as my main terminal emulator, and its config contains no geometry settings at all.   I also checked out Xterm's config just to be sure, and even it is still set to 80x24.   
    If I set the font size to 10+, the terminal behaves correctly again.   I've narrowed down all possible config files, and the only thing I see changing the terminal size is when I move the font size down to 9. 
    I suppose i could create a bash script to launch terminator with the -geometry=80x24 string, but that just seems sloppy.
    Last edited by Beelzebud (2011-06-07 17:29:19)

    I found a solution to my problem.   I'm using the Oxygen-Gtk theme, which mimics the KDE4 oxygen theme.   In the theme is a config file called 'kdeglobals', which contains font settings.  If I set the 'desktopFont' and 'font' settings to 10, and leave the 'menuFont' at 9, it actually achieves a result better than I was hoping for.   My menus and UI all have small fonts now, but the fonts inside of the windows (like medit or thunar) are at 10 which are a bit easier to read.  I'm still not sure why setting the default font to 9 causes the terminal window to shrink, but this ended up working better than I had planned.  I guess I should have tinkered a bit more before I posted.   I just needed to sleep on it.   
    At any rate I'm happy now.   I have a very sleek looking dark oxygen theme on xfce4.
    Just so this wasn't a complete waste of everyone's time, here are the config files I'm using to achieve a dark oxygen-gtk theme.   Just install oxygen-gtk, and then make a copy of /usr/share/themes/oxygen-gtk and use these configs for a darker look:
    /usr/share/themes/oxygen-gtk-dark/gtk-2.0/kdeglobals
    [ColorEffects:Disabled]
    Color=112,111,110
    ColorAmount=-0.8
    ColorEffect=0
    ContrastAmount=0.65
    ContrastEffect=1
    IntensityAmount=0.25
    IntensityEffect=2
    [ColorEffects:Inactive]
    ChangeSelectionColor=true
    Color=0,0,0
    ColorAmount=0.025
    ColorEffect=2
    ContrastAmount=0.4
    ContrastEffect=2
    Enable=false
    IntensityAmount=0
    IntensityEffect=0
    [Colors:Button]
    BackgroundAlternate=66,65,64
    BackgroundNormal=64,63,62
    DecorationFocus=39,94,160
    DecorationHover=87,129,176
    ForegroundActive=150,191,240
    ForegroundInactive=120,119,117
    ForegroundLink=80,142,216
    ForegroundNegative=232,88,72
    ForegroundNeutral=192,162,95
    ForegroundNormal=232,230,227
    ForegroundPositive=120,183,83
    ForegroundVisited=142,121,165
    [Colors:Selection]
    BackgroundAlternate=22,68,120
    BackgroundNormal=24,72,128
    DecorationFocus=39,94,160
    DecorationHover=87,129,176
    ForegroundActive=150,191,240
    ForegroundInactive=81,119,166
    ForegroundLink=80,142,216
    ForegroundNegative=232,88,72
    ForegroundNeutral=192,162,95
    ForegroundNormal=255,255,255
    ForegroundPositive=120,183,83
    ForegroundVisited=142,121,165
    [Colors:Tooltip]
    BackgroundAlternate=17,51,86
    BackgroundNormal=16,48,80
    DecorationFocus=39,94,160
    DecorationHover=87,129,176
    ForegroundActive=150,191,240
    ForegroundInactive=120,119,117
    ForegroundLink=80,142,216
    ForegroundNegative=232,88,72
    ForegroundNeutral=192,162,95
    ForegroundNormal=196,209,224
    ForegroundPositive=120,183,83
    ForegroundVisited=142,121,165
    [Colors:View]
    BackgroundAlternate=36,35,35
    BackgroundNormal=32,31,31
    DecorationFocus=39,94,160
    DecorationHover=87,129,176
    ForegroundActive=150,191,240
    ForegroundInactive=120,119,117
    ForegroundLink=80,142,216
    ForegroundNegative=232,88,72
    ForegroundNeutral=192,162,95
    ForegroundNormal=212,210,207
    ForegroundPositive=120,183,83
    ForegroundVisited=142,121,165
    [Colors:Window]
    BackgroundAlternate=52,51,50
    BackgroundNormal=48,47,47
    DecorationFocus=39,94,160
    DecorationHover=87,129,176
    ForegroundActive=150,191,240
    ForegroundInactive=120,119,117
    ForegroundLink=80,142,216
    ForegroundNegative=232,88,72
    ForegroundNeutral=192,162,95
    ForegroundNormal=224,222,219
    ForegroundPositive=120,183,83
    ForegroundVisited=142,121,165
    [General]
    XftAntialias=true
    XftHintStyle=hintmedium
    XftSubPixel=none
    desktopFont=Sans Serif,10,-1,5,50,0,0,0,0,0
    fixed=Monospace,9,-1,5,50,0,0,0,0,0
    font=Sans Serif,10,-1,5,50,0,0,0,0,0
    menuFont=Sans Serif,9,-1,5,50,0,0,0,0,0
    shadeSortColumn=true
    smallestReadableFont=Sans Serif,8,-1,5,50,0,0,0,0,0
    taskbarFont=JH_Fallout,9,-1,5,50,0,0,0,0,0
    toolBarFont=Sans Serif,8,-1,5,50,0,0,0,0,0
    [Icons]
    Theme=Amazing_Dark
    *Change the icon theme to whatever you want
    /usr/share/themes/oxygen-gtk-dark/gtk-2.0/
    # global settings
    gtk-alternative-button-order = 1
    # oxygen's generic style options
    style "oxygen-default"
    GtkPaned::handle-size = 3
    GtkButton::child_displacement_x = 0
    GtkButton::child_displacement_y = 0
    GtkButton::default_border = { 0, 0, 0, 0 }
    GtkButton::default_outside_border = { 0, 0, 0, 0 }
    GtkButton::inner-border = { 2, 2, 1, 0 }
    GtkToggleButton::inner-border = { 0, 0, 1, 0 }
    GtkCalendar::inner-border = 0
    GtkCalendar::horizontal-separation = 0
    GtkCheckButton::indicator-size = 18
    GtkComboBox::appears-as-list = 1
    GtkEntry::honors-transparent-bg-hint = 1
    GtkExpander::expander-size = 15
    GtkMenu::horizontal-padding = 3
    GtkMenu::vertical-padding = 5
    GtkMenu::horizontal-offset = -7
    GtkCheckMenuItem::indicator-size = 16
    GtkScale::slider-width = 23
    GtkScale::slider-length = 15
    GtkScrollbar::trough-border=1
    GtkScrollbar::stepper-size=12
    GtkScrolledWindow::scrollbar-spacing=1
    GtkStatusbar::has-resize-grip = FALSE
    GtkTreeView::allow-rules = 1
    GtkTreeView::row-ending-details = 1
    GtkTreeView::expander-size = 15
    # shadow types
    GtkMenuBar::shadow-type = GTK_SHADOW_NONE
    GtkStatusbar::shadow-type = GTK_SHADOW_NONE
    GtkToolbar::shadow-type = GTK_SHADOW_NONE
    bg[NORMAL] = { 0.188, 0.184, 0.184 }
    bg[SELECTED] = { 0.094, 0.282, 0.502 }
    bg[INSENSITIVE] = { 0.188, 0.184, 0.184 }
    bg[ACTIVE] = { 0.165, 0.161, 0.161 }
    bg[PRELIGHT] = { 0.188, 0.184, 0.184 }
    base[NORMAL] = { 0.125, 0.122, 0.122 }
    base[SELECTED] = { 0.094, 0.282, 0.502 }
    base[INSENSITIVE] = { 0.188, 0.184, 0.184 }
    base[ACTIVE] = { 0.094, 0.282, 0.502 }
    base[PRELIGHT] = { 0.094, 0.282, 0.502 }
    text[NORMAL] = { 0.831, 0.824, 0.812 }
    text[SELECTED] = { 1.000, 1.000, 1.000 }
    text[INSENSITIVE] = { 0.165, 0.161, 0.161 }
    text[ACTIVE] = { 1.000, 1.000, 1.000 }
    text[PRELIGHT] = { 1.000, 1.000, 1.000 }
    fg[NORMAL] = { 0.878, 0.871, 0.859 }
    fg[SELECTED] = { 1.000, 1.000, 1.000 }
    fg[INSENSITIVE] = { 0.165, 0.161, 0.161 }
    fg[ACTIVE] = { 0.878, 0.871, 0.859 }
    fg[PRELIGHT] = { 0.878, 0.871, 0.859 }
    engine "oxygen-gtk"
    class "*" style "oxygen-default"
    # entries
    # do not change unless also changing Entry_SideMargin in OxygenStyle.h
    style "oxygen-entry-margins" = "oxygen-default"
    { xthickness = 5 }
    class "GtkEntry" style "oxygen-entry-margins"
    # menuitems padding
    style "oxygen-menubar" = "oxygen-default"
    xthickness = 1
    ythickness = 1
    class "GtkMenuBar" style "oxygen-menubar"
    # menuitems padding
    style "oxygen-menubaritem" = "oxygen-default"
    { xthickness = 3 }
    style "oxygen-menuitem" = "oxygen-default"
    xthickness = 1
    ythickness = 5
    style "oxygen-separator-menuitem" = "oxygen-default"
    xthickness = 1
    ythickness = 1
    class "GtkMenuItem" style "oxygen-menubaritem"
    widget_class "*<GtkMenu>.<GtkMenuItem>" style "oxygen-menuitem"
    widget_class "*<GtkMenu>.<GtkSeparatorMenuItem>" style "oxygen-separator-menuitem"
    # toolbuttons with menu
    style "oxygen-menutoolbutton" = "oxygen-default"
    xthickness=1
    ythickness=1
    GtkButton::focus-padding=0
    GtkWidget::focus-line-width=0
    class "*GtkMenuToolButton" style "oxygen-menutoolbutton"
    widget_class "*.GtkMenuToolButton.*Box.GtkToggleButton" style "oxygen-menutoolbutton"
    # icon views
    style "oxygen-iconview" = "oxygen-default"
    { GtkWidget::focus-line-width=0 }
    class "GtkIconView" style "oxygen-iconview"
    # notebook settings
    style "oxygen-notebook" = "oxygen-default"
    xthickness = 4
    ythickness = 4
    class "GtkNotebook" style "oxygen-notebook"
    # comboboxes
    style "oxygen-combobox" = "oxygen-default"
    # must set combobox frame x thickness to 0, otherwise there
    # is a dead area between combobox text and button
    xthickness = 0
    style "oxygen-combobox-frame" = "oxygen-default"
    # must set combobox frame x thickness to 0, otherwise there
    # is a dead area between combobox text and button
    xthickness = 4
    ythickness = 4
    class "GtkComboBox" style "oxygen-combobox"
    widget_class "*<GtkComboBox>.<GtkFrame>" style "oxygen-combobox-frame"
    # editable combobox margins
    style "oxygen-combobox-entry" = "oxygen-default"
    xthickness = 1
    ythickness = 1
    class "GtkComboBoxEntry" style "oxygen-combobox-entry"
    style "oxygen-combobox-entry-button" = "oxygen-combobox-entry"
    { xthickness = 2 }
    widget_class "*<GtkComboBoxEntry>.<GtkButton>" style "oxygen-combobox-entry-button"
    style "oxygen-combo-button" = "oxygen-combobox-entry"
    { xthickness = 0 }
    widget_class "*<GtkCombo>.<GtkButton>" style "oxygen-combo-button"
    # option menu
    style "oxygen-option-menu" = "oxygen-default"
    xthickness = 4
    ythickness = 0
    class "GtkOptionMenu" style "oxygen-option-menu"
    # vertical separators need enough room
    style "oxygen-vseparator" = "oxygen-default"
    { xthickness = 3 }
    class "GtkVSeparator" style "oxygen-vseparator"
    # 2pixels thickness.
    style "oxygen-w2" = "oxygen-default"
    xthickness = 2
    ythickness = 2
    class "GtkScrolledWindow" style "oxygen-w2"
    class "GtkViewport" style "oxygen-w2"
    class "GtkFrame" style "oxygen-w2"
    class "GtkProgressBar" style "oxygen-w2"
    # tree headers
    style "oxygen-header" = "oxygen-default"
    xthickness = 2
    ythickness = 0
    widget_class "*<GtkTreeView>.<GtkButton>" style "oxygen-header"
    widget_class "*<GtkList>.<GtkButton>" style "oxygen-header"
    widget_class "*GimpThumbBox*.<GtkEventBox>.<GtkVBox>.<GtkButton>" style "oxygen-header"
    # Workarounds
    # gimp
    style "oxygen-gimp-scale"
    # this ensures that toolpanels fonts in gimp is identical
    # to default font (which otherwise is ugly
    GimpDock::font-scale = 1.01
    class "*" style "oxygen-gimp-scale"
    This will basically give you an oxygen theme in gtk2 that looks nearly identical to KDE4's Oxygen theme with the Obsidian Coast color pack.

  • How do I find, at-a-glance, the sample size used in several music files?

    How do I find, at-a-glance, the sample size used in several music files?
    Of all the fields available in a FInder Search, "Sample Size" is not available. Finder does offer a "Bits per Sample" field, but it only recognized graphic files and not music files.
    Running 10.8.5 on an iMac i5.
    I did search through a couple of communities but came up empty.
    Thank you,
    Craig

    C-squared,
    There is no View Option to allow display of a column of sample size. 
    For WAV or Apple Lossless files, it is available on the Summary tab (one song at a time, as you know).  For MP3 and AAC it is not available at all.
    You can roughly infer it from the files that are larger than expected for their time.
    99% of the music we use is at the CD standard of 16-bit, so I can guess that displaying it has never been a priority.  However, if you want to make a suggestion to Apple, use this link:
    http://www.apple.com/feedback/itunesapp.html

Maybe you are looking for