com.smartgwt.client.widgets.events.ResizedHandler Java Examples

The following examples show how to use com.smartgwt.client.widgets.events.ResizedHandler. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TagsDashboard.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public TagsDashboard() {
	setShowColumnMenus(false);
	setShowEdges(false);
	setShowShadow(false);
	setCanDrag(false);
	setCanDrop(false);
	setColumnBorder("0px");

	addResizedHandler(new ResizedHandler() {

		@Override
		public void onResized(ResizedEvent event) {
			if (cloud != null)
				cloud.refresh();
		}
	});
}
 
Example #2
Source File: DocumentsPreviewPanel.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public DocumentsPreviewPanel() {
	setAlign(Alignment.CENTER);
	selectLabel = new Label(" " + selectLabelString);
	selectLabel.setOverflow(Overflow.HIDDEN);
	
	setInitialSize();
	reset();
	
	addResizedHandler(new ResizedHandler() {
		@Override
		public void onResized(ResizedEvent event) {
			if ("true".equals(Session.get().getConfig("gui.preview.openpanel")))
				Offline.put(widthCookieName, getWidthAsString());
		}
	});
}
 
Example #3
Source File: ExtendedPropertiesPanel.java    From document-management-software with GNU Lesser General Public License v3.0 6 votes vote down vote up
public ExtendedPropertiesPanel(GUIExtensibleObject object, ChangedHandler changedHandler,
		ChangedHandler templateChangedHandler, boolean updateEnabled, boolean checkMandatory,
		boolean allowTemplateSelection) {
	super();
	this.object = object;
	this.changedHandler = changedHandler;
	this.templateChangedHandler = templateChangedHandler;
	this.updateEnabled = updateEnabled;
	this.checkMandatory = checkMandatory;
	this.allowTemplateSelection = allowTemplateSelection;

	setWidth100();
	setHeight100();
	setMembersMargin(20);
	refresh();

	addResizedHandler(new ResizedHandler() {

		@Override
		public void onResized(ResizedEvent event) {
			adaptForms();
		}
	});
}
 
Example #4
Source File: LoginWindow.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
protected void initializeWindow() {
        setShowModalMask(true);
        setIsModal(true);
        setTitle(i18n.login());
        setWidth(WIDTH);
        setHeight(HEIGHT);
        centerInPage();
        setCanDragResize(true);
        setShowMaximizeButton(true);
        setShowMinimizeButton(false);
//        setMargin(10);
        addResizedHandler(new ResizedHandler() {
            @Override
            public void onResized(ResizedEvent event) {
                WIDTH = LoginWindow.this.getWidth();
                HEIGHT = LoginWindow.this.getHeight();
            }
        });
    }
 
Example #5
Source File: StationSelector.java    From SensorWebClient with GNU General Public License v2.0 6 votes vote down vote up
private void initializeWindow() {
      setID(COMPONENT_ID);
      setOverflow(HIDDEN);
      setShowModalMask(true);
      setIsModal(true);
      setTitle(i18n.pickStation());
      setWidth(WIDTH);
      setHeight(HEIGHT);
      centerInPage();
      setCanDragResize(true);
      setShowMaximizeButton(true);
      setShowMinimizeButton(false);
      addResizedHandler(new ResizedHandler() {
	@Override
	public void onResized(ResizedEvent event) {
		WIDTH = StationSelector.this.getWidth();
		HEIGHT = StationSelector.this.getHeight();
		setSelectionMenuButtonPosition();
		setSelectionMenuWindowPosition();
		setStationLoadingSpinnerPosition();
		setInfoWindowPosition();
	}
});
  }
 
Example #6
Source File: TagCloudDashlet.java    From document-management-software with GNU Lesser General Public License v3.0 5 votes vote down vote up
public TagCloudDashlet(GUIDashlet guiDashlet) {
	super(guiDashlet);

	if (Feature.enabled(Feature.TAGS)) {
		setMinHeight(200);

		setTitle(AwesomeFactory.getIconHtml("tag", I18N.message("tagcloud")));

		if (guiDashlet.getId() > 0) {
			setCanDrag(true);
			setCanDrop(true);
		} else {
			setHeaderControls(HeaderControls.HEADER_LABEL, refreshControl);
		}

		setDragAppearance(DragAppearance.OUTLINE);
		setDragOpacity(30);

		refresh();

		addResizedHandler(new ResizedHandler() {
			@Override
			public void onResized(ResizedEvent event) {
				refresh();
			}
		});
	} else
		addItem(new FeatureDisabled());
}
 
Example #7
Source File: PreviewPanel.java    From document-management-software with GNU Lesser General Public License v3.0 4 votes vote down vote up
public PreviewPanel(final GUIDocument document) {
	this.document = document;
	this.docId = document.getDocRef() != null ? document.getDocRef() : document.getId();

	DocumentProtectionManager.askForPassword(docId, new DocumentProtectionHandler() {

		@Override
		public void onUnprotected(GUIDocument doc) {
			accessGranted = true;

			if (Util.isMediaFile(document.getFileName().toLowerCase())) {
				reloadMedia();
			} else if (Util.isWebContentFile(document.getFileName().toLowerCase())) {
				reloadHTML();
			} else if (Util.isEmailFile(document.getFileName().toLowerCase())) {
				reloadMail();
			} else if (Util.isDICOMFile(document.getFileName().toLowerCase())) {
				FolderService.Instance.get().getFolder(document.getFolder().getId(), false, false, false,
						new AsyncCallback<GUIFolder>() {

							@Override
							public void onFailure(Throwable caught) {
								Log.serverError(caught);
							}

							@Override
							public void onSuccess(GUIFolder folder) {
								if (folder.isDownload())
									reloadDICOM();
								else
									reloadPreview();
							}
						});

			} else {
				reloadPreview();
			}

			redraw();
		}
	});

	addResizedHandler(new ResizedHandler() {

		@Override
		public void onResized(ResizedEvent event) {
			if (getWidth() < 10L) {
				// The panel has been closed
				clearContent();
				width = 0;
				height = 0;
				html = null;
				preview = null;
				dicom = null;
				media = null;
				mail = null;
				reload = null;
			} else if (!redrawing && (width != getWidth() || height != getHeight())) {
				width = getWidth();
				height = getHeight();
				clearContent();
				showReloadPanel();
			}
		}
	});
}