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

net.vectorpublish.desktop.vp.EditMenuImpl Maven / Gradle / Ivy

There is a newer version: 0.9.27
Show newest version
/*
 * Copyright (c) 2016, Peter Rader. All rights reserved.
 *  ___ ___               __                 ______         __     __  __         __
 * |   |   |.-----..----.|  |_ .-----..----.|   __ \.--.--.|  |--.|  ||__|.-----.|  |--.
 * |   |   ||  -__||  __||   _||  _  ||   _||    __/|  |  ||  _  ||  ||  ||__ --||     |
 *  \_____/ |_____||____||____||_____||__|  |___|   |_____||_____||__||__||_____||__|__|
 *
 * http://www.gnu.org/licenses/gpl-3.0.html
 */
package net.vectorpublish.desktop.vp;

import java.util.Locale.LanguageRange;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;

import org.springframework.context.annotation.DependsOn;

import net.vectorpublish.desktop.vp.api.EditMenu;
import net.vectorpublish.desktop.vp.api.ui.MenuBar;
import net.vectorpublish.desktop.vp.i8n.I8n;
import net.vectorpublish.desktop.vp.i8n.LanguageChangeListener;
import net.vectorpublish.desktop.vp.ui.i8n.I8nTextDefault;

@Named
@DependsOn("fileMenuImpl")
public class EditMenuImpl extends EditMenu implements LanguageChangeListener {
	@Inject
	private final MenuBar menu = null;

	/**
	 * Injects a CDI-Bean.
	 */
	@Inject
	private final I8n i8n = null;

	public EditMenuImpl() {
		super();
	}

	@Override
	public void changedTo(LanguageRange lr) {
		setText(i8n.getTranslation(I8nTextDefault.MENU_EDIT));
	}

	@PostConstruct
	private void setup() {
		menu.add(this);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy