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


Java ClickEvent类代码示例

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


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

示例1: createStopMarker

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
private Marker createStopMarker(GeocodedLocation geocodedLocation) {
	Marker marker = new Marker(geocodedLocation.getLon(), geocodedLocation.getLat());
	marker.setIcon(new ThemeResource("images/icons/scheduler-module/marker.png"));

	String street = geocodedLocation.getGeocodedAddress() != null ? geocodedLocation.getGeocodedAddress() : "";

	final Popup popup = new Popup(marker.getLon(), marker.getLat(), "</b></p><p><b>Dirección: </b>" + street);
	// + "</p><p><b> Localidad: </b>" + locality
	// + "</p><p><b> Código Postal: </b>" + postalCode
	// + "</p><p><b> Provincia: </b>" + province
	// + "</p><p><b> País: </b>" + country + "</p>");
	popup.setPopupStyle(PopupStyle.FRAMED_CLOUD);
	popup.setAnchor(marker);

	marker.addClickListener(new ClickListener() {

		@Override
		public void click(ClickEvent event) {

			openLayersMap.addPopup(popup);
		}
	});

	return marker;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:26,代码来源:AddressField.java

示例2: click

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void click(ClickEvent event) {
  ConfirmationDialogPopupWindow confirm = new ConfirmationDialogPopupWindow(
    i18nManager.getMessage(Messages.RELATED_CONTENT_CONFIRM_DELETE, attachment.getName()));
  
  confirm.addListener((ConfirmationEventListener)this);
  confirm.showConfirmation();
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:8,代码来源:TaskRelatedContentComponent.java

示例3: click

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void click(ClickEvent event) {
	int xPosition = event.getRelativeX();
	int yPosition = event.getRelativeY();

	// Uncomment the following line to show clicked position coordinates.
	//com.vaadin.ui.Notification.show("X " + xPosition + " Y " + yPosition);

	// Get the wound at this position
	WoundPosition woundPosition = woundManager.getWoundPositionAtCoordinates(
			(int) Math.round(xPosition/scaleFactor),
			(int) Math.round(yPosition/scaleFactor));
	
	setSelectedWoundPosition(woundPosition);
}
 
开发者ID:fau-amos-2014-team-2,项目名称:root,代码行数:15,代码来源:WoundSelector.java

示例4: changeVariables

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
@Override
public void changeVariables(Object source, Map<String, Object> variables) {
	super.changeVariables(source, variables);
	if (variables.containsKey("click")) {
		fireEvent(new ClickEvent(this, null));
	}
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:8,代码来源:Marker.java

示例5: createFrameRateSelector

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
private Component createFrameRateSelector() {
    final HorizontalLayout buttons = new HorizontalLayout();
    buttons.setCaption("Framerate");
    buttons.addStyleName("framerate");
    Button.ClickListener listener = new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            for (Component button : buttons) {
                button.removeStyleName("selected");
            }
            frameDelayMs = (Integer) event.getButton().getData();
            preview.setFrameDelay(frameDelayMs);
            event.getButton().addStyleName("selected");
        }
    };
    int[] options = { 300, 200, 100 };
    for (int option : options) {
        Button b = new Button("", listener);
        b.setIcon(new ThemeResource(String.format("images/frames-%d.png",
                option)));
        b.setData(option);
        buttons.addComponent(b);
        if (option == frameDelayMs) {
            b.addStyleName("selected");
        }
    }
    return buttons;
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:30,代码来源:GifBoothUI.java

示例6: addImage

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
private void addImage(final File imageFile) {
    FileResource imageResource = new FileResource(imageFile);

    // Frame list
    Image image = new Image(null, imageResource);
    image.setWidth("104px");
    final CssLayout wrapper = new CssLayout();
    wrapper.addComponent(image);
    image.addClickListener(new ClickListener() {

        @Override
        public void click(ClickEvent event) {
            framesLayout.removeComponent(wrapper);
            preview.removeImage(imageFiles.indexOf(imageFile));
            imageFiles.remove(imageFile);
            downloadButton.setEnabled(!imageFiles.isEmpty());
        }
    });
    framesLayout.addComponent(wrapper);

    // Add to preview animation
    preview.addImage(imageResource);

    // Add to our internal list
    imageFiles.add(imageFile);
    if (imageFiles.size() > 1) {
        webcamAndGif.replaceComponent(gifImage, preview);
        downloadButton.setEnabled(true);
    }
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:31,代码来源:GifBoothUI.java

示例7: openRow

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void openRow(final ClickEvent event, final Object itemId, final Object propertyId)
{
	if (event.getButton() == MouseButton.RIGHT)
	{
		for (TableContextMenuEvents events : eventsList)
			events.preContextMenuOpen();

		open(event.getClientX(), event.getClientY());
	}
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:11,代码来源:TableContextMenu.java

示例8: click

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
@Override
public void click(ClickEvent event) {
	ToggleButton btn = (ToggleButton) event.getComponent();
	btn.toggle();
}
 
开发者ID:villeteam,项目名称:vexer,代码行数:6,代码来源:ToggleButton.java

示例9: addClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void addClickListener(ClickListener listener) {
	addListener("click", ClickEvent.class, listener,
			ClickListener.clickMethod);
	requestRepaint();
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:6,代码来源:Marker.java

示例10: removeClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void removeClickListener(ClickListener listener) {
	removeListener(ClickEvent.class, listener);
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:4,代码来源:Marker.java

示例11: addClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void addClickListener(ClickListener listener) {
    addListener("click", ClickEvent.class, listener,
            ClickListener.clickMethod);
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:5,代码来源:Popup.java

示例12: removeClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
public void removeClickListener(ClickListener listener) {
    removeListener(ClickEvent.class, listener);
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:4,代码来源:Popup.java

示例13: click

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
@Override
public void click(MouseEventDetails mouseDetails) {
    fireEvent(new ClickEvent(ScaleImage.this, mouseDetails));
}
 
开发者ID:alump,项目名称:ScaleImage,代码行数:5,代码来源:ScaleImage.java

示例14: addClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
/**
 * Add click listener
 * @param listener Listener added
 */
public Registration addClickListener(MouseEvents.ClickListener listener) {
    return addListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class, listener,
            MouseEvents.ClickListener.clickMethod);
}
 
开发者ID:alump,项目名称:ScaleImage,代码行数:9,代码来源:ScaleImage.java

示例15: removeClickListener

import com.vaadin.event.MouseEvents.ClickEvent; //导入依赖的package包/类
/**
 * Remove click listener
 * @param listener Listener removed
 */
public void removeClickListener(MouseEvents.ClickListener listener) {
    removeListener(EventId.CLICK_EVENT_IDENTIFIER, ClickEvent.class,
            listener);
}
 
开发者ID:alump,项目名称:ScaleImage,代码行数:9,代码来源:ScaleImage.java


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