Lively Kernel canvas
* MIT license
*
* Includes enhancements by Scott Trenda
* and Kris Kowal
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.]]> 99 ? Math.round(L / 10) : L),
t: H < 12 ? "a" : "p",
tt: H < 12 ? "am" : "pm",
T: H < 12 ? "A" : "P",
TT: H < 12 ? "AM" : "PM",
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};
return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();
// Some common format strings
dateFormat.masks = {
"default": "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
// Internationalization strings
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};
// For convenience...
Date.prototype.format = function (mask, utc) {
return dateFormat(this, mask, utc);
};]]>
GridLayout40true
savefalsenulltruenull
rectfalsenulltruefalsetrue 400) {\n\tthis.yPosition = 100;\n} else {\n\tthis.yPosition += 50;\n}\n\nvar morph = Morph.makeRectangle(pt(500, this.yPosition),pt(50,30));\nmorph.setFill(Color.random())\nvar world = WorldMorph.current();\nworld.addMorph(morph);"]]>null300
module('projects.Grid.GridBagLayoutTest').load()t=newprojects.Test.GridBagLayoutTest.GeneralTest()t.runAll()//t.runTest('testAddMorph')t.result6truetruefalsetruetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Wikicontroltruetrue
varcontainer=$morph("gridMorph");varmanager=container.layoutManager;varmorph=manager.getMorphAt(0,0);manager.setColSpanForMorph(morph,2);manager.setRowSpanForMorph(morph,2);truetruefalsetruetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
varcontainer=$morph("gridMorph");container.layoutManager=newGridBagLayoutManager(container);
1truetruefalsetruetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
vargridMorph=Morph.makeRectangle(pt(0,0),pt(50,30));gridMorph.name="gridMorph";varworld=WorldMorph.current();world.addMorph(gridMorph);3truetruefalsetruetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
varcontainer=$morph("gridMorph");varmanager=container.layoutManager;manager.addRowAt(1);manager.addColAt(1);manager.relayout();truetruefalsetruetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
varmorph=Morph.makeRectangle(pt(0,0),pt(50,30));varcontainer=$morph("gridMorph");container.addMorph(morph);
2truetruefalse
truetruefalse
false00.11truefalsetruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalsenull212