Skip to content

Instantly share code, notes, and snippets.

View bugabinga's full-sized avatar
♨️
Working hard.

Oliver Jan Krylow bugabinga

♨️
Working hard.
View GitHub Profile
@bugabinga
bugabinga / SearchBoxWithButton.java
Created September 5, 2013 06:58
Simple mgwt search form, demonstration flexbox model layout.
/**
* <p>
* SearchBoxWithButton.java ©2013 isp-insoft GmbH
* </p>
* <p>
* Created by Oliver Krylow, 08:24:16
* </p>
*/
import com.google.gwt.dom.client.Style.BorderStyle;
@bugabinga
bugabinga / WXButton.java
Created September 6, 2013 09:06
A better mgwt button. Accepts a widget.
/**
* <p>
* WXButton.java
* </p>
* <p>
* ©2013 isp-insoft GmbH
* </p>
* <p>
* Created by Oliver Krylow (10:10:17h)
* </p>
@bugabinga
bugabinga / Icon.java
Created September 6, 2013 09:15
Simple mgwt square icon. The default size is dependent on current font size. This is because icons usually decorate text in some form.
/**
*
*/
package com.bugabinga.widgets;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.resources.client.DataResource;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
@bugabinga
bugabinga / ExampleDialog.java
Created November 21, 2013 12:18
An example showcasing how to create a simple pop in dialog in MGWT.
package com.bugabinga.net.client.widget.dialog;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHTML;
import com.google.gwt.user.client.ui.HasText;
import com.googlecode.mgwt.dom.client.event.tap.HasTapHandlers;
import com.googlecode.mgwt.dom.client.event.tap.TapEvent;
import com.googlecode.mgwt.dom.client.event.tap.TapHandler;
import com.googlecode.mgwt.ui.client.dialog.Dialog;
@bugabinga
bugabinga / TransitionedInputExample.java
Created March 8, 2014 09:12
Answer to Stackoverflow question about delayed actions in JavaFX.
package application;
import javafx.animation.RotateTransition;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ContentDisplay;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
@bugabinga
bugabinga / AnimateNodeIn.java
Created March 16, 2014 00:53
JavaFX-Sample of how to animate Node in and out of Scene.
package application;
import java.util.function.Supplier;
import javafx.animation.Animation;
import javafx.animation.FadeTransition;
import javafx.animation.Interpolator;
import javafx.animation.RotateTransition;
import javafx.animation.ScaleTransition;
import javafx.application.Application;
@bugabinga
bugabinga / EllipseTransformator
Created March 19, 2014 06:39
Simple demonstration of interactive Shape transformation with a mouse in JavaFX.
package application;
import java.text.MessageFormat;
import javafx.animation.FadeTransition;
import javafx.animation.Interpolator;
import javafx.application.Application;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleDoubleProperty;
@bugabinga
bugabinga / OptionalUse.java
Created March 28, 2014 14:19
Java Optional type example
class MaybeBaby {
public final Optional<String> data;
public MaybeBaby(String data) {
this.data = Optional.of(data) ;
}
public MaybeBaby() {
data = Optional.empty() ;
}
public static main(String[] args) {
MaybeBaby no = new MaybeBaby() ;
@bugabinga
bugabinga / JavaFxGuiTaskExample
Created November 4, 2014 10:49
How to show progress indicators for long running GUI operations?
package com.isp.lpt.progress;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.stage.Stage;
public class ToolbarCustomExample extends Application