Skip to content

Instantly share code, notes, and snippets.

View branflake2267's full-sized avatar
🏠
Working from home

Brandon Donnelson branflake2267

🏠
Working from home
View GitHub Profile
@branflake2267
branflake2267 / AbstractStoreSelectionModel.java
Created November 2, 2018 17:32
4.0.4-SNAPSHOT grid selection model
package com.sencha.gxt.widget.core.client.selection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.logical.shared.BeforeSelectionEvent;
@branflake2267
branflake2267 / Layer.java
Created October 16, 2018 02:20
4.0.3 shim and layer
package com.sencha.gxt.core.client.dom;
import java.util.Stack;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.ImageResource.ImageOptions;
@branflake2267
branflake2267 / HlcLayoutIssue.java
Created October 10, 2018 18:46
When the HorizontalLayoutContainer clips the widgets workaround.
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer.HorizontalLayoutData;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.form.FieldLabel;
import com.sencha.gxt.widget.core.client.form.FieldSet;
@branflake2267
branflake2267 / ComboboxExample.java
Created September 28, 2018 20:23
GXT combo example.
package com.sencha.gxt.test.client.combo;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.sencha.gxt.cell.core.client.form.ComboBoxCell;
@branflake2267
branflake2267 / GridSelectionModel.java
Last active November 16, 2018 21:05
GXT 4.0.3 workaround for touch not firing selection or click in the grid. Android, iOS, And windows edge, grid selection issue solution. Fix in 4.0.4.
package com.sencha.gxt.widget.core.client.grid;
import java.util.Collections;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.user.client.Event;
@branflake2267
branflake2267 / HlcHtmlWidthIssue.java
Created September 25, 2018 17:13
HorizontalLayoutContainer layout width testing with a FieldLabel in GXT 4.0.3
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer.HorizontalLayoutData;
import com.sencha.gxt.widget.core.client.form.FieldLabel;
import com.sencha.gxt.widget.core.client.form.FieldSet;
import com.sencha.gxt.widget.core.client.form.FormPanel.LabelAlign;
import com.sencha.gxt.widget.core.client.form.TextField;
@branflake2267
branflake2267 / AbstractGridEditing.java
Created August 7, 2018 00:21
GXT 4.0.3 workaround for GridInlineEditing and Grid DND (Draggable). EXTGWT-5679
package com.sencha.gxt.widget.core.client.grid.editing;
import java.util.HashMap;
import java.util.Map;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
@branflake2267
branflake2267 / PurpleButton.gss
Last active August 2, 2018 02:54
GXT 4.0.x (4.0.2, 4.0.3+) Button or ButtonCell appearance override. Extending an Appearance. (ButtonCellAppearance)
@def BACKGROUND_COLOR rgba(102,51,153, 0.8);
@def GRADIENT rgba(102,51,153, 0.8);
/*
Override super css classes here
*/
.button {
background: BACKGROUND_COLOR;
/* @alternate */ background: -webkit-linear-gradient(top, GRADIENT);
/* @alternate */ background: -ms-linear-gradient(top, GRADIENT);
@branflake2267
branflake2267 / RichTextAreaImplSafari.java
Last active July 13, 2018 15:48
GXT/GWT 2.8.2 - RichTextArea override/workaround for Microsoft (MS) Edge where the text background/highlight color doesn't work.
/*
* Copyright 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@branflake2267
branflake2267 / HBoxLayoutContainer.java
Last active September 19, 2018 02:08
GXT 4.0.3 workqround for HBoxLayoutContainer UiBinder issue. 'child' works again with this workaround. This adds a "sibling" tag to fix it. This will be fixed in 4.0.4
package com.sencha.gxt.widget.core.client.container;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import com.google.gwt.core.client.GWT;