UNPKG

ts-jsdk

Version:

TypeScript implementation of the Java platform

27 lines 620 B
import { AbstractButton } from "./AbstractButton"; export class DefaultAction { constructor(text) { this.text = text; this.enabled = true; } actionPerformed(_event) { } setEnabled(enabled) { this.enabled = enabled; } isEnabled() { return this.enabled; } } export class JMenuItem extends AbstractButton { constructor(action) { super(); if (typeof action === "string") { this.action = new DefaultAction(action); } else { this.action = action; } } } //# sourceMappingURL=JMenuItem.js.map