All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalismo.ui.view.util.Constants.scala Maven / Gradle / Ivy

/*
 * Copyright (C) 2016  University of Basel, Graphics and Vision Research Group
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */

package scalismo.ui.view.util

import java.awt.Color

/**
 * User Interface Constants
 *
 * The values in here are constants, in the sense that they're not supposed to change while an
 * application is running. However, they are still defined as vars, to allow developers to
 * easily override them if needed. If that is done, it should be done as early as possible
 * (e.g. in the main method), before an actual instance of the UI is created.
 */
object Constants {

  /* Note: the following line suppresses "var could be a val" warnings from IntelliJ IDEA.
   * //noinspection VarCouldBeVal
   * It is prepended to all definitions, because they are intentionally vars instead of vals.
   */

  /**
   * This is the color value that is used as the basic background color when presenting color selections.
   * It is not totally in line with the actual background color used in the renderer (black) - however
   * setting this too dark, or too bright, will result in a perceived mismatch between the selected value
   * and what is actually seen on screen in the render window.
   *
   * The only place where this is currently used is in the [[scalismo.ui.view.properties.ColorPropertyPanel]] class.
   *
   */
  //noinspection VarCouldBeVal
  var PerceivedBackgroundColor: Color = Color.GRAY

  /**
   * This is the default size of icons, *before* any scaling is applied.
   */
  //noinspection VarCouldBeVal
  var StandardUnscaledIconSize: Int = 16

  /**
   * The default font size.
   * This seems to be baked in deeply in all of the Swing internals, so
   * DO NOT CHANGE THIS VALUE unless you REALLY know what you are doing.
   */
  //noinspection VarCouldBeVal
  var DefaultFontSize: Int = 12

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy