Commit Graph

798 Commits

Author SHA1 Message Date
ray aba9d6f6a8 minor optimization I thought of in the shower
git-svn-id: https://samskivert.googlecode.com/svn/trunk@806 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-10 02:30:49 +00:00
ray ab8d540bf2 rewrote getMaxIndexes() to not choke if all the elements are less
than 0, and minimized object creation (at the expense of going
through the array almost twice).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@805 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-10 01:39:44 +00:00
shaper 976b3cbdef Added getMaxIndexes().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@804 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-09 23:33:49 +00:00
shaper 7980020a34 Updated javadoc.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@803 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-09 23:33:38 +00:00
mdb 92eaefef22 A simple "label : slider : value label" combination.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@802 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-25 23:21:33 +00:00
ray b8aafda6ba Added a new interface, DocumentTransformer which can be used to transform
the text of a document after any and all changes are applied.
Changed the setDocumentValidator() to setDocumentHelpers() and allow
the specification of either a DocumentValidator, a DocumentTransformer, or
both.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@801 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-25 20:55:44 +00:00
ray 38d9d608ea Polygons implicetly draw a line from the last point to the first.
This getPolygon() method appears universally unused,
and I'm not sure what's purpose is/was anyway..


git-svn-id: https://samskivert.googlecode.com/svn/trunk@800 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-24 18:58:27 +00:00
shaper 6be599416f Don't bother getting the font in layout() since we don't do anything with
it.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@799 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-23 03:06:59 +00:00
ray 1f5a5495c7 Fixed bug in which a very thin label ("i" for instance) that was
height-constrained would not find an ideal width after just 10 iterations.
Changed it such that if the height constraint causes us to be layed
out in one line, we don't attempt the more complex height-constrained layout,
but instead just fall down to the one-line layout code.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@798 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-18 18:14:02 +00:00
mdb 759141b969 Debugging facility that allows a GUI application to wire up debug "hooks"
that can be invoked by specified key presses (some combination of
modifiers and a single key).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@797 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-17 01:51:53 +00:00
shaper c575c5b2b2 Added reverse(int[]).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@796 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-11 01:33:54 +00:00
ray 1bbaf04fa9 added SwingUtil.applyToHierarchy(Component c, SwingUtil.ComponentOp op)
git-svn-id: https://samskivert.googlecode.com/svn/trunk@795 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-10 01:53:59 +00:00
ray 0dcefaa993 cleanup;
allow specification of collapse/uncollapse icons in the button.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@794 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-10 01:53:32 +00:00
ray 0391ac9277 git-svn-id: https://samskivert.googlecode.com/svn/trunk@793 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2002-07-09 21:52:02 +00:00
ray f605a2dc2f moved back to narya/media
git-svn-id: https://samskivert.googlecode.com/svn/trunk@792 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-09 21:10:28 +00:00
ray f263dd53d3 moved in from other realms
git-svn-id: https://samskivert.googlecode.com/svn/trunk@791 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-09 17:48:23 +00:00
ray d00f28fc05 previously known as
com.threerings.yohoho.puzzle.challenge.client.ChallengePanelUtil


git-svn-id: https://samskivert.googlecode.com/svn/trunk@790 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-09 17:48:13 +00:00
ray d75eac5962 Sort of like a collapsable list, only we have real components inside of
us that can be laid out anywhichway.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@789 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-07-04 04:42:11 +00:00
ray bcab718966 class to hijack mouse events from a component for a while.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@788 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-27 00:14:52 +00:00
ray 4116a39b7b removed logging
git-svn-id: https://samskivert.googlecode.com/svn/trunk@787 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-26 22:06:12 +00:00
ray ddf5335776 Undid my last checkin. I think this one is right: prevent words from
being broken when our width is not constrained.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@786 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-26 22:04:52 +00:00
ray 256482a739 Don't layout more lines than there are words in the text, to prevent
single words being wrapped into two-line labels.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@785 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-26 17:27:51 +00:00
mdb 056e17c0bf Would you believe more fiddling with text offsets and rounding and hairy
business. Also added getLineCount().


git-svn-id: https://samskivert.googlecode.com/svn/trunk@784 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-21 03:05:13 +00:00
mdb 49e225ca47 Test outlined rendering as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@783 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-20 23:45:15 +00:00
samskivert@gmail.com 2b48a8c6c9 Fixed various rounding errors and modified code to properly account for
outlined text when justifying.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@782 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-20 23:44:32 +00:00
mdb e457c8e924 If we catch an arbitrary error while processing an action event, we damned
well better log it.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@781 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-19 23:22:40 +00:00
mdb 23e96b2b2a Added a version of binarySearch() that uses a Comparator.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@780 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-18 00:48:04 +00:00
mdb 51ac425275 Added binarySearch().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@779 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-18 00:45:18 +00:00
shaper b095417bd9 Need to pass the internal session along for update(Object).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@778 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-17 21:30:10 +00:00
shaper 5451957b54 Renamed getToolTipPosition() to the more generally-useful fitRectInRect()
and moved to SwingUtil.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@777 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-14 07:55:11 +00:00
mdb f3c7bf71a0 Use TermUtil for vt100 escape codes and also to obtain the size of our
terminal window (if possible) which will be used to decide where to wrap
our log output.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@776 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-06 20:53:30 +00:00
mdb 6ae292ba71 Moved hacky terminal fiddling code into a separate class.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@775 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-06 20:52:36 +00:00
ray 2db5f69858 Forgot import
git-svn-id: https://samskivert.googlecode.com/svn/trunk@774 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-05 23:15:26 +00:00
ray f48554dde0 added setDocumentValidator and the DocumentValidator interface which
can be used to restrict text in a text field or other document.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@773 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-06-05 22:54:53 +00:00
mdb 27a5717048 Not to crash if we're passed a null message.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@772 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 22:19:07 +00:00
mdb 970049d402 Need to do the right thing for first log line wrap width as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@771 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 21:19:58 +00:00
mdb b031977805 Fixed bugs pointed out by Mr. Greenwell: milliseconds field need only be 3
wide, use GAP rather than prefix that may contain formatting codes to
obtain wrapped line width.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@770 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 21:15:27 +00:00
mdb cf76f2dce5 Only use vt100 escape codes if they're enabled via -Dlog_vt100=true.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@769 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 21:06:26 +00:00
mdb 751b963199 Fancied up the default log provider. It now wraps log lines at 132 columns
and uses VT100 escape codes to highlight module names, warning log
messages and debug log messages.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@768 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 20:45:26 +00:00
mdb c583d4a81d Allow the setting of module-specific log levels via system properties.
This is done like so:

% java -Dlog_level:module=debug ...


git-svn-id: https://samskivert.googlecode.com/svn/trunk@767 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 20:44:41 +00:00
mdb 1c409ee735 Added time stamp and log level info to default log output.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@766 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 18:47:05 +00:00
mdb 8279009ded Added support for long integer preferences.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@765 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-31 17:08:40 +00:00
ray 1d41ce55a5 replaced unused long[] version of shuffle with an Object[] version.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@764 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-29 18:00:04 +00:00
shaper 51eb070a53 Fixed shuffling to properly account for the offset when shuffling with a
non-zero offset.  Added a few rudimentary tests.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@763 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-29 00:08:17 +00:00
shaper 9c33c3da0f Added byte[] and long[] variants of shuffle().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@762 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-28 22:32:14 +00:00
mdb eb88c5a4ef Made interval manager use a synchronized int map in which to store its
interval wrappers; fixed up javadocs.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@761 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-24 21:32:29 +00:00
mdb c172c41a15 Fixed potential failure to freak out if a synchronized int map was created
with a null source map.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@760 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-24 21:31:56 +00:00
mdb ebebcbf530 Added savedoc target for saving rebuild javadocs.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@759 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-24 20:33:10 +00:00
ray 7bfa6234ef updated documentation so that we don't get anyone excited about
nonexistant features


git-svn-id: https://samskivert.googlecode.com/svn/trunk@758 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-23 23:43:17 +00:00
ray 404ac11173 Ripped out the guts of IntervalManager and replaced them with Java 1.4's
java.util.Timer. We might as well use the standard stuff, and why not:
it's got a snazzy priority heap for scheduling.
However, we still like the flexibility of IntervalManager's static methods
and the Interval interface (Timer's helper, TimerTask, is a class. Boo.).
Note: I ripped out so many guts that we no longer have the ability to
use a pool of helper threads for expiring Intervals. We never used it
anyway. If we desire it in the future, it'd be easy enough to put back in.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@757 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-05-23 23:37:50 +00:00