Exemplo n.º 1
0
 static int getFrameOpacity() {
   try {
     NimRODTheme th = (NimRODTheme) NimRODLookAndFeel.theme;
     return th.getFrameOpacity();
   } catch (Throwable ex) {
     return NimRODTheme.DEFAULT_FRAME_OPACITY;
   }
 }
Exemplo n.º 2
0
  /**
   * Esta funcion se usa para inicializar los colores del tema segun los argumentos que se le pasen.
   */
  static NimRODTheme iniCustomColors(
      NimRODTheme nt,
      String selection,
      String background,
      String p1,
      String p2,
      String p3,
      String s1,
      String s2,
      String s3,
      String w,
      String b,
      String opMenu,
      String opFrame) {
    if (selection != null) {
      nt.setPrimary(Color.decode(selection));
    }
    if (background != null) {
      nt.setSecondary(Color.decode(background));
    }

    if (p1 != null) {
      nt.setPrimary1(Color.decode(p1));
    }
    if (p2 != null) {
      nt.setPrimary2(Color.decode(p2));
    }
    if (p3 != null) {
      nt.setPrimary3(Color.decode(p3));
    }

    if (s1 != null) {
      nt.setSecondary1(Color.decode(s1));
    }
    if (s2 != null) {
      nt.setSecondary2(Color.decode(s2));
    }
    if (s3 != null) {
      nt.setSecondary3(Color.decode(s3));
    }

    if (w != null) {
      nt.setWhite(Color.decode(w));
    }
    if (b != null) {
      nt.setBlack(Color.decode(b));
    }

    if (opMenu != null) {
      nt.setMenuOpacity(Integer.parseInt(opMenu));
    }
    if (opFrame != null) {
      nt.setFrameOpacity(Integer.parseInt(opFrame));
    }

    return nt;
  }