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

y.swing-shortcut-manager_2.9.0-1.1.0.0.source-code.XAction.scala Maven / Gradle / Ivy

The newest version!
/*
This file is part of swing-keyboard-manager
, a shortcut manager
for Java Swing used in Penn TotalRecall


swing-keyboard-manager 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, version 3 only.

swing-keyboard-manager 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 swing-keyboard-manager.  If not, see
.
*/

package edu.upenn.psych.memory.shortcutmanager

case class XAction(val className: String,
                   enum: Option[String],
                   name: String,
                   tooltip: Option[String],
                   shortcut: Option[Shortcut]) {

  val javaTooltip = tooltip.getOrElse(null)
  val javaShortcut = shortcut.getOrElse(null)
  val javaEnum = enum.getOrElse(null)

  val id = {
    enum match {
      case Some(str) => List(className, str).mkString("-")
      case None => className
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy