This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log('Merge text layers starting'); | |
const sketch = require('sketch'); | |
var Rectangle = require('sketch/dom').Rectangle; | |
var Text = require('sketch/dom').Text; | |
const document = sketch.fromNative(context.document); | |
var fullText = ""; | |
var x = 10000000; | |
var y = -1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val.addConstraint(phone, new Constraint() { | |
public boolean isValid(Object value) { | |
String v = (String)value; | |
for(int i = 0 ; i < v.length() ; i++) { | |
char c = v.charAt(i); | |
if(c >= '0' && c <= '9' || c == '+' || c == '-') { | |
continue; | |
} | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template name="front.cover"> | |
<xsl:call-template name="page.sequence"> | |
<xsl:with-param name="master-reference">titlepage-cover-image</xsl:with-param> | |
<xsl:with-param name="content"> | |
<fo:block text-align="center"> | |
<fo:external-graphic src="developer-guide-cover-image.jpg" content-height="297mm" content-width="210mm"/> | |
</fo:block> | |
</xsl:with-param> | |
</xsl:call-template> | |
</xsl:template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DevGuideIndexGenerator { | |
/** | |
* Argument 0 should be the output asciidoc file | |
* Argument 1 should be the index file in the website | |
* Argument 2 onwards should be the files in the manual in the correct order | |
*/ | |
public static void main(String[] args) throws Exception { | |
String version = args[0]; | |
FileOutputStream asciidocFile = new FileOutputStream(args[1]); | |
FileWriter indexFile = new FileWriter(args[2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTML_ONLY_START | |
You can learn more about multi-images in the https://www.codenameone.com/manual/advanced-theming.html#_understanding_images_multi_images[advanced theming] section. | |
// HTML_ONLY_END | |
//// | |
//PDF_ONLY | |
You can learn more about multi-images in the <<understanding-images-and-multi-images>> section. | |
//// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "title=About The Codename One Developer Guide - Build Cross Platform Apps Using Java | |
type=manual | |
tags=docs | |
status=published | |
previousPage=gui-builder | |
nextPage=introduction | |
~~~~~~ | |
:icons: font | |
" | cat - ~/dev/CodenameOne.wiki/About-This-Guide.asciidoc | sed "s/image::/image::\//g" | sed "s/image:img/image:\/img/g" > ~/dev/CodenameOne/newWebsite/templates/content/manual/about.adoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextModeLayout tl = new TextModeLayout(3, 2); | |
Form f = new Form("Pixel Perfect", tl); | |
TextComponent title = new TextComponent().label("Title"); | |
TextComponent price = new TextComponent().label("Price"); | |
TextComponent location = new TextComponent().label("Location"); | |
PickerComponent date = PickerComponent.createDate(new Date()).label("Date"); | |
TextComponent description = new TextComponent().label("Description").multiline(true); | |
Validator val = new Validator(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form hi = new Form("RoundRect", new BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER)); | |
Button ok = new Button("OK"); | |
Button cancel = new Button("Cancel"); | |
Label loginLabel = new Label("Login", "Container"); | |
loginLabel.getAllStyles().setAlignment(Component.CENTER); | |
Label passwordLabel = new Label("Password", "Container"); | |
passwordLabel.getAllStyles().setAlignment(Component.CENTER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final DoubleProperty<Length> metre = new DoubleProperty<>("metre"); | |
public final DoubleProperty<Length> km = new DoubleProperty<>("km") { | |
public Double get() { | |
return meter.get() / 0.001; | |
} | |
public Length set(Double d) { | |
return meter.set(d * 1000); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class MyApplication { | |
private var current: Form? = null | |
private var theme: Resources? = null | |
fun init(context: Any?) { | |
theme = UIManager.initFirstTheme("/theme") | |
Toolbar.setGlobalToolbar(true) | |
Log.bindCrashProtection(true) | |
} | |
fun start() { |
NewerOlder