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 / ComboColorChooserExample.java
Created March 20, 2019 23:28
GXT 4 custom combobox with color choices in a gallery format.
import java.util.Arrays;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Display;
@branflake2267
branflake2267 / AppResources.java
Created February 27, 2019 20:11
GXT 4 custom split button using material icon.
package com.sencha.gxt.test.client.button_custommenu;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
public interface AppResources extends ClientBundle {
public static AppResources INSTANCE = GWT.create(AppResources.class);
@branflake2267
branflake2267 / JsniExample.java
Created February 22, 2019 18:17
GXT 4.x JSNI example. Start the app later, by importing the script. Call into the application from Javascript.
package com.sencha.gxt.test.client.jsni_callinto;
import com.google.gwt.core.client.EntryPoint;
import com.sencha.gxt.widget.core.client.info.Info;
public class JsniExample implements EntryPoint {
private native void myInfo() /*-{
function myInfo(value) {
// Call static java method
@branflake2267
branflake2267 / BLCwithCollapsedWidthExample.java
Created February 22, 2019 14:12
GXT 4.0.2 BorderLayoutContainer override. getCollapsedHeaderHeight(panel) added.
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.AttachEvent;
import com.google.gwt.event.logical.shared.AttachEvent.Handler;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
import com.sencha.gxt.widget.core.client.container.MarginData;
import com.sencha.gxt.widget.core.client.container.Viewport;
@branflake2267
branflake2267 / CustomCss3ButtonCellAppearance.java
Created February 21, 2019 23:09
GXT 4.0.x custom split button appearance barebones.
import com.google.gwt.core.shared.GWT;
import com.sencha.gxt.theme.triton.client.base.button.Css3ButtonCellAppearance;
public class CustomCss3ButtonCellAppearance<C> extends Css3ButtonCellAppearance<C> {
public interface CustomCss3ButtonResources extends Css3ButtonResources {
@Override
@Source({ "com/sencha/gxt/theme/triton/client/base/button/Css3ButtonCell.gss",
"com/sencha/gxt/theme/triton/client/base/button/Css3ButtonCellToolBar.gss",
"CustomStyles.gss" }) // override styles here
@branflake2267
branflake2267 / teamcity-buildstep.sh
Last active April 6, 2019 05:19
Teamcity Sencha NPM Login Method. This Generates the ~/.npmrc login credentials.
# Build step
# You can replicate this by running `npm login --registry=https://npm.sencha.com --scope=@sencha` on your system.
# Get your authtoken by logging in on your system and finding the auth token in ~/.npmrc.
# Remove previous file
rm -f ~/.npmrc
# Write new ~/.npmrc
echo "Writing auth tokens to ~/.npmrc"
echo "@sencha:registry=http://npm.sencha.com" >> ~/.npmrc
@branflake2267
branflake2267 / launch.json
Created January 7, 2019 06:35
Debug Ext JS in VSCode using these launchers. Includes WebPack Dev Server Launcher and Chrome Debugger launcher.
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug App",
// https://github.com/webpack/docs/wiki/webpack-dev-server
"program": "${workspaceFolder}/node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"args": [
@branflake2267
branflake2267 / GridWithSelectTagTest.java
Created December 21, 2018 14:24
GXT 4 Grid with Select Tag and Options
package com.sencha.gxt.test.client.grid;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.Editor.Path;
@branflake2267
branflake2267 / TreeWithSimulatedLoadingExample.java
Created November 16, 2018 17:10
GXT 4.0.3 Load subtrees on expand, using custom loading logic.
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
@branflake2267
branflake2267 / DatePickerMessagesExample.java
Created November 7, 2018 18:06
GXT datepicker messages override options
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.sencha.gxt.cell.core.client.form.DateCell;
import com.sencha.gxt.widget.core.client.DatePicker;
import com.sencha.gxt.widget.core.client.DatePicker.DatePickerDateTimeFormatInfo;
import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.form.DateField;
import com.sencha.gxt.widget.core.client.menu.DateMenu;
public class DatePickerMessagesExample implements EntryPoint {