Java Code Examples for com.google.gwt.dom.client.Style.Unit#PX

The following examples show how to use com.google.gwt.dom.client.Style.Unit#PX . 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: HistorySearch.java    From document-management-system with GNU General Public License v2.0 6 votes vote down vote up
/**
 * HistorySearch
 */
public HistorySearch() {
	stackPanel = new StackLayoutPanel(Unit.PX);
	searchSaved = new SearchSaved();
	userNews = new UserNews();
	scrollSearchSavedPanel = new ScrollPanel();
	scrollUserNewsSavedPanel = new ScrollPanel();

	scrollSearchSavedPanel.addStyleName("okm-PanelSelected");
	scrollUserNewsSavedPanel.addStyleName("okm-PanelSelected");

	scrollSearchSavedPanel.add(searchSaved);
	scrollSearchSavedPanel.setSize("100%", "100%");

	scrollUserNewsSavedPanel.add(userNews);
	scrollUserNewsSavedPanel.setSize("100%", "100%");

	stackPanel.add(scrollSearchSavedPanel, Util.createHeaderHTML("img/icon/stackpanel/find.gif", Main.i18n("leftpanel.label.stored.search")), true, 22);
	stackPanel.add(scrollUserNewsSavedPanel, Util.createHeaderHTML("img/icon/news.gif", Main.i18n("leftpanel.label.user.search")), true, 22);

	stackPanel.showWidget(0);
	stackPanel.setStyleName("okm-StackPanel");
	stackPanel.addStyleName("okm-DisableSelect");
	initWidget(stackPanel);
}
 
Example 2
Source File: ExtendedStackPanel.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
public ExtendedStackPanel() {
	super(Unit.PX);
}
 
Example 3
Source File: ExtendedStackPanel.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
public ExtendedStackPanel() {
	super(Unit.PX);
	navHandlerExtensionList = new ArrayList<NavigatorHandlerExtension>();
}
 
Example 4
Source File: ExtendedDockPanel.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Extended dock panel
 */
public ExtendedDockPanel() {	    
    
	dockPanel = new DockLayoutPanel(Unit.PX);
	folderSelectPopup = new FolderSelectPopup();
	enableKeyShorcuts();

	// Object initialization
	topPanel = new TopPanel();
	leftBorderPanel = new VerticalBorderPanel();
	rightBorderPanel = new VerticalBorderPanel();
	bottomPanel = new BottomPanel();

	// Desktop panels initialization
	desktop = new Desktop();

	// Search panels initialization
	search = new Search();

	// Dashboard panel initialization
	dashboard = new Dashboard();

	// Administration panel initialization
	administration = new Administration();

	// set inner component's size
	setWidgetsSize();

	actualView = UIDockPanelConstants.DESKTOP;

	// Creates the dockPanel
	dockPanel.addNorth(topPanel, TopPanel.PANEL_HEIGHT);
	dockPanel.addSouth(bottomPanel, BottomPanel.PANEL_HEIGHT);
	dockPanel.addWest(leftBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
	dockPanel.addEast(rightBorderPanel, VERTICAL_BORDER_PANEL_WIDTH);
	dockPanel.add(desktop);

	Window.addResizeHandler(new ResizeHandler() {
		@Override
		public void onResize(ResizeEvent event) {
			setWidgetsSize();
			Main.get().mainPanel.topPanel.toolBar.windowResized(); // splitter changes
		}
	});

	initWidget(dockPanel);
}
 
Example 5
Source File: SearchIn.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * SearchIn
 */
public SearchIn() {
	futuramaWalking = new FuturamaWalking();
	hPanel = new HorizontalPanel();
	tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX);
	searchSimple = new SearchSimple();
	searchNormal = new SearchNormal();
	searchAdvanced = new SearchAdvanced();
	searchMetadata = new SearchMetadata(this);
	searchControl = new SearchControl();
	status = new Status();
	status.setStyleName("okm-StatusPopup");

	// Adding keyword listeners
	searchSimple.fullText.addKeyUpHandler(searchControl.keyUpHandler);
	searchNormal.content.addKeyUpHandler(searchControl.keyUpHandler);
	searchNormal.name.addKeyUpHandler(searchControl.keyUpHandler);
	searchNormal.keywords.addKeyUpHandler(searchControl.keyUpHandler);
	searchAdvanced.from.addKeyUpHandler(searchControl.keyUpHandler);
	searchAdvanced.to.addKeyUpHandler(searchControl.keyUpHandler);
	searchAdvanced.subject.addKeyUpHandler(searchControl.keyUpHandler);

	// By default is enabled simple mode
	tabPanel.add(searchSimple, Main.i18n("search.simple"));
	tabPanel.selectTab(0);

	Image verticalLine = new Image("img/transparent_pixel.gif");
	verticalLine.setStyleName("okm-Vertical-Line-Border");
	verticalLine.setSize("2px", "100%");
	hPanel.add(tabPanel);
	hPanel.add(verticalLine);
	hPanel.add(searchControl);

	hPanel.setCellWidth(verticalLine, "2px");
	hPanel.setCellHeight(verticalLine, "100%");
	hPanel.setCellWidth(searchControl, "" + CONTROLLER_WIDTH + "px");
	hPanel.setCellVerticalAlignment(tabPanel, HasAlignment.ALIGN_TOP);
	hPanel.setCellVerticalAlignment(searchControl, HasAlignment.ALIGN_TOP);

	// Gets all users
	searchNormal.getAllUsers();

	initWidget(hPanel);
}
 
Example 6
Source File: TabDocument.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * The Document tab
 */
public TabDocument() {
	doc = new GWTDocument();
	propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>();
	tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX);
	document = new Document();
	notes = new Notes(Notes.DOCUMENT_NOTE);
	version = new VersionScrollTable();
	security = new SecurityScrollTable();
	preview = new Preview(null);
	panel = new VerticalPanel();
	propertyGroup = new ArrayList<PropertyGroup>();
	widgetExtensionList = new ArrayList<TabDocumentExtension>();
	docHandlerExtensionList = new ArrayList<DocumentHandlerExtension>();

	tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
		@Override
		public void onSelection(SelectionEvent<Integer> event) {
			final int tabIndex = event.getSelectedItem().intValue();
			Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex));
			selectedTab = tabIndex;

			if (tabIndex == SECURITY_TAB) {
				Timer timer = new Timer() {
					@Override
					public void run() {
						security.fillWidth(); // Always when shows fires fill width
					}
				};
				timer.schedule(500); // Fill width must be done after really it'll be visible
			}

			preview.cleanPreview(); // Always clean preview tab

			if (tabIndex == PREVIEW_TAB) {
				Timer previewTimer = new Timer() {
					@Override
					public void run() {
						previewDocument(false);
					}
				};
				previewTimer.schedule(500);
			}

			fireEvent(HasDocumentEvent.TAB_CHANGED);
		}
	});

	panel.add(tabPanel);
	tabPanel.setWidth("100%");
	document.setSize("100%", "100%");
	notes.setSize("100%", "100%");
	panel.setSize("100%", "100%");
	tabPanel.setStyleName("okm-DisableSelect");

	initWidget(panel);
}
 
Example 7
Source File: TabMail.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * The Document tab
 */
public TabMail() {
	widgetExtensionList = new ArrayList<TabMailExtension>();
	mailHandlerExtensionList = new ArrayList<MailHandlerExtension>();
	propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>();
	tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX);
	mail = new Mail();
	notes = new Notes(Notes.MAIL_NOTE);
	mailViewer = new MailViewer();
	security = new SecurityScrollTable();
	panel = new VerticalPanel();
	propertyGroup = new ArrayList<PropertyGroup>();

	tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
		@Override
		public void onSelection(SelectionEvent<Integer> event) {
			int tabIndex = event.getSelectedItem().intValue();
			Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex));
			selectedTab = tabIndex;

			if (tabIndex == SECURITY_TAB) {
				Timer timer = new Timer() {
					@Override
					public void run() {
						security.fillWidth(); // Always when shows fires fill width
					}
				};
				timer.schedule(500); // Fill width must be done after really it'll be visible
			}

			fireEvent(HasMailEvent.TAB_CHANGED);
		}
	});

	panel.add(tabPanel);
	tabPanel.setWidth("100%");
	mail.setSize("100%", "100%");
	notes.setSize("100%", "100%");
	mailViewer.setSize("100%", "100%");
	panel.setSize("100%", "100%");
	tabPanel.setStyleName("okm-DisableSelect");

	initWidget(panel);
}
 
Example 8
Source File: TabFolder.java    From document-management-system with GNU General Public License v2.0 4 votes vote down vote up
/**
 * TabFolder
 */
public TabFolder() {
	widgetExtensionList = new ArrayList<TabFolderExtension>();
	folderHandlerExtensionList = new ArrayList<FolderHandlerExtension>();
	propertyGroupHandlerExtensionList = new ArrayList<PropertyGroupHandlerExtension>();
	tabPanel = new TabLayoutPanel(TAB_HEIGHT, Unit.PX);
	folder = new Folder();
	security = new SecurityScrollTable();
	notes = new Notes(Notes.FOLDER_NOTE);
	panel = new VerticalPanel();
	propertyGroup = new ArrayList<PropertyGroup>();

	tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
		@Override
		public void onSelection(SelectionEvent<Integer> event) {
			int tabIndex = event.getSelectedItem().intValue();
			Main.get().mainPanel.topPanel.toolBar.evaluateRemovePropertyGroup(isRemovePropertyGroupEnabled(tabIndex));
			selectedTab = tabIndex;

			if (tabIndex == SECURITY_TAB) {
				Timer timer = new Timer() {
					@Override
					public void run() {
						security.fillWidth(); // Always when shows fires fill width
					}
				};
				timer.schedule(500); // Fill width must be done after really it'll be visible
			}

			fireEvent(HasFolderEvent.TAB_CHANGED);
		}
	});

	panel.add(tabPanel);
	tabPanel.setWidth("100%");
	folder.setSize("100%", "100%");
	notes.setSize("100%", "100%");
	panel.setSize("100%", "100%");
	tabPanel.setStyleName("okm-DisableSelect");

	initWidget(panel);
}
 
Example 9
Source File: MonitorView.java    From EasyML with Apache License 2.0 3 votes vote down vote up
@Override
public Widget asWidget() {

	DockLayoutPanel dockLayout = new DockLayoutPanel(Unit.PX);

	dockLayout.addNorth(headerView, 35);
	dockLayout.add(mainLayout);

	return dockLayout;
}