Package net.xoetrope.xui.style

Examples of net.xoetrope.xui.style.XStyleManager


   * @param comp the component
   * @param styleName the style to lookup
   */
  public static void applyStyle( XProject currentProject, Object comp, String styleName )
  {
    XStyleManager styleManager = currentProject.getStyleManager();
    XStyle xstyle = styleManager.getStyle( styleName );
    WidgetAdapter adapter = WidgetAdapter.getInstance();
    if ( xstyle != null ) {
      adapter.setFont( comp, styleManager.getFont( xstyle ) );
      adapter.setBackground( comp, xstyle.getStyleAsColor( XStyle.COLOR_BACK ) );
      adapter.setForeground( comp, xstyle.getStyleAsColor( XStyle.COLOR_FORE ) );

      if ( comp instanceof XStyleComponent )
        (( XStyleComponent)comp).setStyle( styleName );
View Full Code Here


   */
  public void paintDesktopPaneBackground( SynthContext context, Graphics g, int x, int y, int w, int h )
  {
    JComponent c = (JComponent)context.getComponent();
    String startStyle = ( String ) UIManager.get( "Desktop.desktopStyle" );
    XStyleManager sm = currentProject.getStyleManager();
    XStyle panelStyle = sm.getStyle( startStyle );
    Color start = panelStyle.getStyleAsColor( XStyle.COLOR_FORE );
    Color end = panelStyle.getStyleAsColor( XStyle.COLOR_BACK );

//    c.setForeground( start );
//    c.setBackground( end );
View Full Code Here

    currentProject = XProjectManager.getCurrentProject();

    clearState = true;
       
    // Style the panel
    XStyleManager sm = currentProject.getStyleManager();
    if ( sm.hasStyle( "dockingPanel" )) {
      XStyle dockingStyle = sm.getStyle( "dockingPanel" );
      if ( dockingStyle instanceof XStyleEx ) {
        XStyleEx exStyle = (XStyleEx)dockingStyle;
        int idx = exStyle.getStyleIndex( "border" );
        if ( idx > 0 ) {
          Color borderColor = dockingStyle.getStyleAsColor( XStyle.COLOR_FORE );
View Full Code Here

    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
View Full Code Here

TOP

Related Classes of net.xoetrope.xui.style.XStyleManager

Copyright © 2018 www.massapicom. 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.