Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 4:35 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Jun 04, 2010 11:37 am 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
I did a major rework on the TextAreaModel and HTMLTextAreaModel. The new classes & interfaces now have their own package: de.matthiasmann.twl.textarea. The new model can now better represent CSS styles.

The following classes are used to specify styles:
  • Style - stores all attributes for each element and a reference to the Style of it's surrounding element
  • StyleAttribute - Similar to an enum, contains a list of all possible style attributes which can be set in a Style
  • CSSStyle - a subclass of Style which can be constructed from a CSS style string

With the above classes the TextAreaModel.Element interface is now a lot smaller and easier to implement.

Any feedback on this would be appreciated.

_________________
TWL - The Themable Widget Library


Last edited by MatthiasM on Tue Jun 15, 2010 8:57 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2010 8:43 pm 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 594
Nice job!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2010 9:28 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Another update to TextArea: reworked how margin and padding is handled. It should now behave more like HTML/CSS. Vertical margin implementation is still incomplete.

Also the preferred way to specify a font via CSS is now style="font-family: bla". The old style="font: bla" is still supported.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2010 6:56 am 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Next update: All element interfaces have been changed into classes. This should make the implementation of custom TextAreaModel much easier.

Merging of vertical margin has been implemented, fixed a few errors in horizontal margin computations and paragraph end now uses a margin-bottom to implement the spacing. For this a Style class now has an option to specify alternate defaults which can be overridden by it's values or it's class reference.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2010 11:11 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
Next update: It now supports tables !!

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 10, 2010 11:26 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1171
CSS Style Sheets added, table rows can now be styled (background-image, margin-top/bottom, padding-top/bottom and height)

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group