OpenRule 2.0

Friday, April 16th, 2010

Released OpenRule 2.0 (Venus) into the wild. Lots of new features including:

* Transparency controls
* Can measure in Inches, Centimeters, Pica and Pixels
* Custom measurements can be created
* The new Preference dialog allows you to customize the functionality and look of the ruler
* The tick leader line — a small line that hangs off the ruler — helps you keep track of where your mouse is on the ruler
* The ruler can be nudged by one pixel using the arrow keys and moved by 10 pixels by holding down the control key and using the arrow keys
* New about information
* Pressing F1 takes you to the user guide page
* Window and Mac executable are available

OpenRule Mercury

Friday, October 31st, 2008

About 2 months of coding has finally paid off. Mercury has been release earlier this week. This is the first stable version of the screen ruler OpenRule. It is a very basic version of the popular freeware program JRuler. One of my favorite features is the snap to zero functionality, which will snap the ruler to your cursor at pixel zero. More information can be found on the project page.

OpenRule roadmap

Monday, October 27th, 2008

This is the overall roadmap for the OpenRule software. The current status version of OpenRule is marked below in orange-yellow. Hopefully, by the time we reach Mars status OpenRule can be marked as mature and will not need any more additional features. As always you can get the most up to date version on the project page.

Mercury (1.x)

  • Must be always on top
  • Have ruler ticks counting off the units
  • Displays the number of pixels from the beginning of the ruler (pixel 0)
  • Ruler should be easily re-sizable
  • A fast key for flipping between horizontal and vertical modes.
  • Close and minimize buttons
  • Snap beginning of ruler to cursor
  • The ruler is drag-able

Venus (2.x)

  • Add Program icon to replace the default Java Icon.
  • Allow the ruler to be transparent
  • Allow the ruler to be different colors.
  • Nudge the whole ruler by a pixel using arrow keys    (left, right, top and bottom)
  • A leader hangs off of the ruler which easily shows where your cursor is on the ruler
  • About menu item
  • Help menu item
  • Change the tick units (px, inch, cm, pica, custom)
  • Add Default Preferences for: color and transparency, orientation, always on top, tick units,

Earth (3.x)

  • Reorganize code to be more efficient and faster
  • Measure anywhere on the ruler
  • Change the color of the tick leader
  • Change the color of the ticks and measurements
  • Default Preference for bar layout
  • Bookmark option to mark points on the ruler
  • Snap end of the ruler to cursor
  • Snap ruler to cursor at pixel position X
  • Snap cursor to end of ruler
  • Snap cursor to beginning of ruler
  • Snap cursor to nearest tick
  • Snap cursor to nearest tick mode
  • Click, click measure mode (The mouse click defines the beginning and ending positions)
  • Swap the info bar and tick bar

Mars (4.x)

  • Rotate ruler
  • Click, click measure at an angle (The mouse click defines the beginning and ending positions)

Revision List*

• Must be always on top — Make this optional but default to “always on top”
• Nudge by 5 pixels when using ctrl+arrow keys

Bug List*

Does not work on Mac (Java 1.5.x)

Found a Bug? Report it!

Ongoing Tasks

• Code documentation
• Getting started and Help sections
• Streamlining code making it efficient

*A significant amount of minor revisions and bugs can count for a version or significant internal code revision.

OpenRule update

Thursday, October 23rd, 2008

This past week has seen lots of effort in getting the basic version of OpenRule up and running. Here are some highlights:

  • Developed the vertical version of the ruler
  • Added the RulerEvent and RulerListener claases to address
    • flipping between the two Ruler modes
    • form controls (minimizing, exiting)
    • global keyboard commands
  • Allow the ruler to resize

You can download the newest version of the ruler here and the code here. Have comments or questions about OpenRule? Email us at paul(at)leadiv(dot)com or post a comment on this post.
Always welcome other developers to help make OpenRule even better. If you are interested please contact me here paul(at)leadiv(dot)com

OpenRule notes

Monday, October 20th, 2008

While working on open rule I ran into an interesting issue. I created a TickBar object that draws the ticks on the ruler (the lines marking off individual units). This was extended from the JPanel class so that I could easily draw on it using the paintComponent function. After creating TickBar I wanted to extend it to create a vertical version. The only problem was when I went to draw on the vertical version, it drew the horizontal and vertical ticks. The reason why is because I have to make a call to the super of this function to make sure that the component is clean and ready to be drawn on. However, when I am in the Vertical version of the TickBar the call to the super causes the horizontal ticks to be drawn as well.

To solve this delimma I created an interface called Drawable. Drawable separates out the drawing function from the paintComponent function so that the child object could easily over-ride the draw function.
I thought that was kind of cool.

popup menu trouble

Saturday, October 18th, 2008

I ran into some trouble when I tried putting the popup menu on the ruler. It rendered the dragging functionality useless. I was unable to attach the menu to the frame which where the draggable functionality is implemented. The solution I found was to apply the draggable events to the main ruler panel which is where the popup menu resides as well. This way the popup menu listeners do not consume all of the mouse listening events.

OpenRule update

Thursday, September 25th, 2008

Uploaded a new version of OpenRule (0.0.20080924r50). I added a “tick” bar which ticks off all the even pixels and groups them in 10s and 20s with labels on the 20s. The new download now includes the source code, license and executable jar. Download the new version here. As always you can also grab the source code from the svn server here. I have been a bit busy which is why this update has been put off. Email me, paul(at)leadiv (dot)com, about any feedback or if you want to join the OpenRule project.

OpenRule

Monday, September 8th, 2008

Purpose: Measure the distance between two points on the screen.

Motivation: I have been doing more precise web development for work and needed a good tool to measure pixel differences of HTML mock ups that I build. This means I need a screen ruler that can be used across all browsers and not just a plug-in that would work for one browser. After searching Google, I found a popular screen ruler that I could use. The only problem is that it is shareware. After extensive usage I find the tool useful but lacking in some areas. This project’s aim is to rectify these changes

Requirements:

  • Measures two points on the screen quickly and intuitively
  • Open Source
  • A small application footprint in memory

To Do Features:

  • Must be always on top
  • Have ruler ticks counting off the units (This should be flexible and easy to change unit types)
  • Displays the number of pixels from the beginning of the ruler (pixel 0)
  • If the cursor is on the ruler guidelines are displayed
  • A leader hangs off of the ruler which easily shows where your cursor is on the ruler
  • A fast key for flipping between horizontal and vertical modes.
  • Close and minimize buttons
  • Middle double click minimizes ruler
  • Snap beginning of ruler to cursor
  • Snap end of the ruler to cursor
  • Snap ruler to cursor at pixel position X
  • Snap cursor to end of ruler
  • Snap cursor to beginning of ruler
  • Snap cursor to nearest tick
  • Snap cursor to nearest tick mode
  • Allow the ruler to be transparent
  • Allow the ruler to be different colors from default
  • The ruler is drag-able
  • Click, click measure mode (The mouse click defines the beginning position and the ending position)
  • Click, click measure at an angle (Same as above but you can rotate as well)
  • Rotate ruler
  • Nudge the whole ruler by a pixel using arrow keys
  • Swap the info bar and tick bar (The info bar shows information such as pixel distance from zero, tick bar shows a graphically representation of the units on the ruler.
  • Ruler should be easily resize-able
  • Change the tick units (px, inch, cm, pica, custom)

Now for those who are wanting to help develop I refer you to my projects page where you can download the source code. Please send me a note if you are adding features (paul[at]leadiv[dot]com). That way we can see about getting you hooked into the project. I dont have an email list up yet since I am the only one interested in such a project at the moment :) . For those interested in looking at the program you can download it here.