Examples of XTranslator


Examples of net.xoetrope.xui.helper.XTranslator

   * @param name the name of the resource used for translation
   * @return the translation object that operates on the resource bundle
   */
  public XTranslator getTranslator( String name )
  {
    XTranslator translator = (XTranslator)getObject( "Translator" + name );
    if ( translator == null ) {
      String translatorClass = getStartupParam( "Translator" );
      if (( translatorClass == null ) || ( translatorClass.length() == 0 ))
        translatorClass = "net.xoetrope.xui.helper.XDefaultTranslator";
      try {
View Full Code Here

Examples of net.xoetrope.xui.helper.XTranslator

    repaint();
  }

  public void setAppTitle( String title )
  {
    XTranslator translator = currentProject.getTranslator();
    setTitle( translator.translate( title ));
  }
View Full Code Here

Examples of net.xoetrope.xui.helper.XTranslator

    colors[ 2 ] = Color.orange; // activeColor - the stripe under the active component
    colors[ 3 ] = colors[ 2 ];// activeTextColor
    colors[ 4 ] = Color.red;// pressedTextColor


    XTranslator translator = currentProject.getTranslator();
    XStyleManager sm = currentProject.getStyleManager();
    if ( sm.hasStyle( "dockingHeader" )) {
      XStyle xstyle = sm.getStyle( "dockingHeader" );
      colors[ 0 ] = xstyle.getStyleAsColor( XStyle.COLOR_BACK );
      colors[ 1 ] = xstyle.getStyleAsColor( XStyle.COLOR_FORE );

      XStyle xstyleActive = sm.getStyle( "dockingHeader/active" );
      colors[ 2 ] = xstyleActive.getStyleAsColor( XStyle.COLOR_BACK );
      colors[ 3 ] = xstyleActive.getStyleAsColor( XStyle.COLOR_FORE );
    }
   
    // Setup the tooltips
    String[] tooltips = new String[ 3 ];
    tooltips[ 0 ] = ( translator != null ? translator.translate( "Minimize" ) : "Minimize" );
    tooltips[ 1 ] = ( translator != null ? translator.translate( "Zoom/Restore" ) : "Zoom/Restore" );
    tooltips[ 2 ] = ( translator != null ? translator.translate( "Close" ) : "Close" );
   
    super.addDockable( dockable, colors, tooltips );
    if ( doReplace ) {
      if ( contentPane.getComponentCount() > ) {
        XDockable docked = findDockable( contentPane.getComponent( 0 ));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.