Copy to clipboard

While working on the Baking Blogger’s special characters panel, I needed a way to copy the selected character to the clipboard. I used the following technique:
import java.awt.Toolkit;
import java.awt.datatransfer.*;

TextTransfer clipBoard = new TextTransfer();

Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(stringSelection, this);
clipBoard.setClipboardContents(button4.getText());

class TextTransfer implements ClipboardOwner {
@Override
public void lostOwnership(Clipboard clipboard, Transferable contents) {
}

public void setClipboardContents(String aString) {
StringSelection stringSelection = new StringSelection(aString);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(stringSelection, this);
}
}



Start with writing a class that implements the ClipboardOwner interface. This enforces you to implement the method setClipaordContents(String string){}

AirGlass

Google Glasses for the People!

I’ve been working on a Google Glass clone project on-and-off for a few months now

A Raspberry Pi is auto-connect on startup to my iPhone’s hotspot, and projects an AirApp to a re-constructed video glasses display

AirApps are…
micro
web
PUSH (!!!)
apps
with a minimalistic UI/UX

AirApp
Ingredients:
  • Sunglasses frame
  • Video Glasses LCD components
  • Raspberry Pi
  • Tons of hacking, adjustments and nausea
a model with a model
Biggest challenge: come up with the solution of config’ing the raspberry pi to auto connect to my iPhone’s hotspot
Funnest challenge: re-engineering the video glasses

Most interesting challenge: designing and building the AirApps framework


what you see

collaborative whiteboard: sketch.nur.xyz

Hello

If you need to sketch in realtime with others remotely on your tablet, phone or whatever:
http://sketch.nur.xyz/lobby

To create a new session, just change lobby to the room name you want to create or to join
(i.e. sketch.nur.xyz/brainstorming1)

I wish to KISS, but do let me know of additional features you want

desktop

ipad
iphone

PS it’s extra fun with chromecast!