当前位置: 首页>>代码示例>>Java>>正文


Java LayoutClickListener类代码示例

本文整理汇总了Java中com.vaadin.event.LayoutEvents.LayoutClickListener的典型用法代码示例。如果您正苦于以下问题:Java LayoutClickListener类的具体用法?Java LayoutClickListener怎么用?Java LayoutClickListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LayoutClickListener类属于com.vaadin.event.LayoutEvents包,在下文中一共展示了LayoutClickListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildPalette

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
private Component buildPalette() {
    HorizontalLayout paletteLayout = new HorizontalLayout();
    paletteLayout.setSpacing(true);
    paletteLayout.setWidthUndefined();
    paletteLayout.addStyleName("palette");

    paletteLayout.addComponent(buildPaletteItem(PaletteItemType.TEXT));
    paletteLayout.addComponent(buildPaletteItem(PaletteItemType.TABLE));
    paletteLayout.addComponent(buildPaletteItem(PaletteItemType.CHART));

    paletteLayout.addLayoutClickListener(new LayoutClickListener() {
        @Override
        public void layoutClick(final LayoutClickEvent event) {
            if (event.getChildComponent() != null) {
                PaletteItemType data = (PaletteItemType) ((DragAndDropWrapper) event
                        .getChildComponent()).getData();
                addWidget(data, null);
            }
        }
    });

    return paletteLayout;
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:24,代码来源:ReportEditor.java

示例2: setInitialButtons

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
public void setInitialButtons() {
	this.button1.setDetails("./images/icons/newIcons/1418831828_editor_memo_note_pad-128.png", "Methodenauswahl", new LayoutClickListener() {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showMethodScreen();
		}

	});
	
	button1.setActivated();
	button2.setDeactivated();
	
	this.button2.setVisible(true);
	
	setGoToStep(2);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:22,代码来源:ButtonsMiddleViewImpl.java

示例3: setStochasticParameter

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Ändert die Buttons für die Eingabe der Stochastischen Parameter.
 * 
 * @author Tobias Lindner
 */
public void setStochasticParameter () {

	this.button1.setDetails("./images/icons/newIcons/1418831298_common_calendar_month-128.png", "Stochastische", "Methode", new LayoutClickListener() {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showParameterScreen();
		}

	});
	
	this.button2.setVisible(true);

	logger.debug("View: setStochasticParameter");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:25,代码来源:ButtonsMiddleViewImpl.java

示例4: setFCFButton

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
	 * Diese Methode passt die Beschriftung des mittleren Buttons an FCF an.
	 * 
	 * @author Tobias Lindner
	 */
	public void setFCFButton() {	
		this.button1.setDetails("./images/icons/newIcons/1418831563_circle_backup_time_history_recent_time-machine_-128.png", "FCF", "Free Cash Flow", new LayoutClickListener () {

			private static final long serialVersionUID = 1L;

			@Override
			public void layoutClick(LayoutClickEvent event) {
				button2.setDeactivated();
				button1.setActivated();
				presenter.showPeriodScreen();
			}
		});

		this.button2.setVisible(true);
//		setExpandRatio(gap, 1.0f);
		
		logger.debug ("View: setFCFButton");
		
	}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:25,代码来源:ButtonsMiddleViewImpl.java

示例5: setGKVButton

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Diese Methode passt die Beschriftung des mittleren Buttons an GKV an.
 * 
 * @author Tobias Lindner
 */
public void setGKVButton() {
	this.button1.setDetails("./images/icons/newIcons/1418831563_circle_backup_time_history_recent_time-machine_-128.png", "GKV", "Gesamtkostenverfahren", new LayoutClickListener () {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showPeriodScreen();
		}
	});

	this.button2.setVisible(true);
	
	logger.debug ("View: setGKVButton");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:23,代码来源:ButtonsMiddleViewImpl.java

示例6: setUKVButton

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Diese Methode passt die Beschriftung des mittleren Buttons an UKV an.
 * 
 * @author Tobias Lindner
 */
public void setUKVButton() {
	this.button1.setDetails("./images/icons/newIcons/1418831563_circle_backup_time_history_recent_time-machine_-128.png", "UKV", "Umsatzkostenverfahren", new LayoutClickListener () {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showPeriodScreen();
		}
	});

	this.button2.setVisible(true);
	
	logger.debug ("View: setUKVButton");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:23,代码来源:ButtonsMiddleViewImpl.java

示例7: setScenarioButton

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Diese Methode passt die Beschriftung des mittleren Buttons für den ScenarioScreen an.
 * 
 * @author Tobias Lindner
 */
public void setScenarioButton() {
	this.button1.setDetails("./images/icons/newIcons/1418831239_editor_attachment_paper_clip_2-128.png", "Szenarien", new LayoutClickListener () {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showScenarioScreen();
		}
	});
	
	this.button2.setVisible(true);

	logger.debug ("View: setScenarioButton");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:23,代码来源:ButtonsMiddleViewImpl.java

示例8: setResultButton

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Diese Methode passt die Beschriftung des mittleren Buttons für den Result an.
 * 
 * @author Tobias Lindner
 */
public void setResultButton() {
	this.button1.setDetails("./images/icons/newIcons/1418775155_device_board_presentation_content_chart-128.png", "Ergebnis", new LayoutClickListener () {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			button2.setDeactivated();
			button1.setActivated();
			presenter.showResultScreen();;
		}
	});
	
	this.button2.setVisible(false);

	logger.debug ("View: setResultButton");
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:23,代码来源:ButtonsMiddleViewImpl.java

示例9: setGoToStep

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
public void setGoToStep(int step){
	LayoutClickListener lcl;
	switch (step) {
	case 2:
		lcl = generateListener2();
		break;
	case 3:
		lcl = generateListener3();
		break;
	case 4:
		lcl = generateListener4();
		break;
	case 5:
		lcl = generateListener5();
		break;

	default:
		lcl = null;
		break;
	}
	button3.setVisible(true);
	button3.setDetails("Weiter zu Schritt "+step, lcl);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:24,代码来源:ButtonsMiddleViewImpl.java

示例10: generateUi

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Diese Methode erstellt das UI, bestehend aus Inputfeld für Projektname und
 * Projektbeschreibung.
 *
 * @author Marco Glaser
 */
public void generateUi(){
	setWidth(85, UNITS_PERCENTAGE);
	setHeight(100, UNITS_PERCENTAGE);
	
	gap = new Label();
	button = new ButtonMiddle("./images/icons/newIcons/1418766041_circle_arrow-forward_next-128.png", "Zur Berechnung", new LayoutClickListener(){

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			eventBus.fireEvent(new SaveProjectEvent());
		}
		
	});
	button.changeStyleClass("buttonBottom");
	
	gap.setSizeFull();
	
	addComponent(gap);
	addComponent(button);
	setExpandRatio(gap, 1.0f);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:30,代码来源:StartCalculationButtonViewImpl.java

示例11: DashboardView

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
public DashboardView() {
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildHeader());

    root.addComponent(buildSparklines());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);

    // All the open sub-windows should be closed whenever the root layout
    // gets clicked.
    root.addLayoutClickListener(new LayoutClickListener() {
        @Override
        public void layoutClick(final LayoutClickEvent event) {
            DashboardEventBus.post(new CloseOpenWindowsEvent());
        }
    });
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:30,代码来源:DashboardView.java

示例12: buildCatalogView

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
private Component buildCatalogView() {
    CssLayout catalog = new CssLayout();
    catalog.setCaption("Catalog");
    catalog.addStyleName("catalog");

    for (final Movie movie : DashboardUI.getDataProvider().getMovies()) {
        VerticalLayout frame = new VerticalLayout();
        frame.addStyleName("frame");
        frame.setWidthUndefined();

        Image poster = new Image(null, new ExternalResource(
                movie.getThumbUrl()));
        poster.setWidth(100.0f, Unit.PIXELS);
        poster.setHeight(145.0f, Unit.PIXELS);
        frame.addComponent(poster);

        Label titleLabel = new Label(movie.getTitle());
        titleLabel.setWidth(120.0f, Unit.PIXELS);
        frame.addComponent(titleLabel);

        frame.addLayoutClickListener(new LayoutClickListener() {
            @Override
            public void layoutClick(final LayoutClickEvent event) {
                if (event.getButton() == MouseButton.LEFT) {
                    MovieDetailsWindow.open(movie, null, null);
                }
            }
        });
        catalog.addComponent(frame);
    }
    return catalog;
}
 
开发者ID:imotSpot,项目名称:imotSpot,代码行数:33,代码来源:ScheduleView.java

示例13: ButtonMiddle

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Konstruktor für einen Button mit einzeiligem Label
 * 
 * @author Tobias Lindner
 * 
 * @param iconPfad
 * 		String: Pfad zum Icon Image
 * @param text
 * 		String: Text für den Button
 * @param lcl
 * 		LayoutClickListener: Listener, der Aktionen bei Klick auf den ButtonMiddle ausführt.
 */
public ButtonMiddle (String iconPfad, String text, LayoutClickListener lcl) {

	this.lcl = lcl;
	setHeight(95, UNITS_PIXELS);
	setWidth(100, UNITS_PERCENTAGE);
	setStyleName("buttonMiddle");
	
	gap1 = new Label ();
	gap1.setWidth(15, UNITS_PIXELS);
	icon = new Embedded(null, new ThemeResource(iconPfad));
	icon.setWidth(40, UNITS_PIXELS);
	icon.setStyleName("buttonIconMiddle");
	
	gap2 = new Label();
	gap2.setWidth(10, UNITS_PIXELS);
	
	label = new Label (text);
	label.setStyleName("buttonLabelMiddle");
	label.setWidth(Sizeable.SIZE_UNDEFINED, 0);
	label.setHeight(Sizeable.SIZE_UNDEFINED, 0);

	vl = new VerticalLayout();
	vl.addComponent(label);
	vl.setSizeUndefined();
	gap3 = new Label();
	gap3.setSizeFull();
	
	addComponent(gap1);
	addComponent(icon);
	addComponent(gap2);
	addComponent(vl);
	addComponent(gap3);
	setExpandRatio(gap3, 1.0f);
	
	setComponentAlignment(icon, Alignment.MIDDLE_CENTER);
	setComponentAlignment(vl, Alignment.MIDDLE_CENTER);
	
	addListener(lcl);
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:52,代码来源:ButtonMiddle.java

示例14: setDetails

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
/**
 * Anpassung an einem Button mit Möglichkeit zur zweizeiligen Textangabe.
 * 
 * @author Tobias Lindner
 */
public void setDetails (String iconPfad, String text, String text2, LayoutClickListener lcl) {
	setDetails(iconPfad, text, lcl);
	
	label2 = new Label (text2);
	
	vl.removeAllComponents();
	vl.addComponent(label);
	vl.addComponent(label2);
	vl.setComponentAlignment(label, Alignment.TOP_LEFT);
	vl.setComponentAlignment(label2, Alignment.BOTTOM_LEFT);
	vl.setSizeUndefined();
	
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:19,代码来源:ButtonMiddle.java

示例15: generateListener2

import com.vaadin.event.LayoutEvents.LayoutClickListener; //导入依赖的package包/类
private LayoutClickListener generateListener2() {
	LayoutClickListener lcl = new LayoutClickListener() {

		private static final long serialVersionUID = 1L;

		@Override
		public void layoutClick(LayoutClickEvent event) {
			presenter.showParameterScreen();
			button2.setDeactivated();
			button1.setActivated();
		}

	};
	return lcl;
}
 
开发者ID:DHBW-Karlsruhe,项目名称:businesshorizon2,代码行数:16,代码来源:ButtonsMiddleViewImpl.java


注:本文中的com.vaadin.event.LayoutEvents.LayoutClickListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。