Commit Graph

825 Commits

Author SHA1 Message Date
shaper 687628f9f6 Added toString().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@833 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-18 01:18:51 +00:00
ray da66da636f Added add*() methods that let you specify if you don't want the component
to be automatically removed as a target/source when it's removed from
the component hierarchy.
Added remove*() methods.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@832 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-16 21:29:25 +00:00
ray d5ec4bba40 Added support for autoscrolling.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@831 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 21:56:57 +00:00
ray 2bdb22349c Properly pad images that are the same size as the 'best' cursor size in
only one dimension.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@830 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 17:46:29 +00:00
ray 3270fb959f - allow specification of the hotspot for custom cursors.
- don't scale up cursors smaller than the desired size.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@829 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 17:41:41 +00:00
shaper 8636555a67 Don't freak out if the splice() variant with no length parameter is passed
a null values array.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@828 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 02:36:12 +00:00
shaper 66be01eb29 Added various variants of splice() to facilitate array manipulations by
those who are accustomed to slinging backticks and slurping files with
Perl.  Someday perhaps we'll go whole-hog and implement more of the
Perl-style splicing antics (allowing negative offset and/or length, and
optionally passing a list of items to splice into the array.)


git-svn-id: https://samskivert.googlecode.com/svn/trunk@827 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 02:12:26 +00:00
shaper 9f0e3fc3c8 Added size().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@826 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 02:09:05 +00:00
ray 083b7f210e log the platform-dependant restrictions on custom cursors when we create
one.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@825 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 01:04:32 +00:00
samskivert@gmail.com 028a419d23 Moved component-level cursor handling into methods.
Fix: don't copy down parental cursors to children when we drag over them.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@824 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 00:26:10 +00:00
ray 10e09fd566 Reduce cursor flashiness by setting the current cursor to the top level window
and only do per-component cursor overriding if an entered component
(or one of its parents) has a custom cursor.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@823 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-06 00:07:40 +00:00
shaper f2bacfb509 Pass font changes via setFont() along to internal components.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@822 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-09-04 01:28:09 +00:00
shaper deb729e2cd Rolled back to deprecated call to getBoundingBox() so as to properly
effect desired functionality and avoid infinite recursion.  Since
Polygon.calculateBounds() has package-protected access, our only happily
non-deprecated alternative is to copy calculateBounds() and the code from
Polygon.getBoundingBox() into this class, explicitly avoiding a call to
bounds.getBounds(), but for now I choose to live with deprecation.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@821 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-22 01:14:55 +00:00
mdb 628addc144 Pass the drag source along when informing the drop target of a completed
drop.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@820 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-21 17:54:10 +00:00
ray 6823210bd8 reset the last component's cursor before completing a drop.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@819 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-21 00:15:23 +00:00
ray e520cf69b3 fixed up docs
git-svn-id: https://samskivert.googlecode.com/svn/trunk@818 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-20 22:47:49 +00:00
ray d8571fb1dd added support for dragover effects,
fixed NPE


git-svn-id: https://samskivert.googlecode.com/svn/trunk@817 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-20 22:38:42 +00:00
ray 756d6d9702 - listen for mouseExited during a drag and clear the target
- broke enter/exit/released into their own methods
- don't assume components don't have their own custom cursors, restore their
old cursors when we're done with them.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@816 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-20 21:05:10 +00:00
mdb e12f2e9a51 Revise use of deprecated methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@815 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-20 18:57:31 +00:00
ray 597290d4df A simple DnD system that does not allow DnD operations with other programs,
but does things very nicely within a single app.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@814 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-20 02:49:19 +00:00
shaper 51adbd3b20 Added getMaxValue(). Really fixed getMaxIndexes() to not freak out if
values is null.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@813 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-19 23:22:09 +00:00
mdb 15702ec6ba Not to freak out if I recompile with jikes or javac.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@812 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-19 22:59:01 +00:00
mdb 3186c72bf9 New MySQL JDBC driver reports connection loss differently.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@811 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-19 21:18:58 +00:00
shaper 636890a638 Added reverse(byte[]).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@810 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-15 23:00:30 +00:00
mdb 8ce40edfe3 Moved SortableArrayList.binarySearch functionality into ArrayUtil to make
it generally accessible. Moved test code from ArrayUtil into separate
JUnit test class.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@809 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-12 01:10:32 +00:00
mdb ef75007784 Reverted to Ray's comparison order now that I see the light in checking
for less than max first to avoid a second compare in most iterations
through the loop.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@808 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-10 18:45:27 +00:00
mdb a0996535df Other minor optimizations while the going is good.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@807 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2002-08-10 18:42:35 +00:00
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