Minecraft wiki entry for Time-saving_tips, associated text: Shift-clicking makes or moves as many of a stack of an item as possible. Making good use of this trick is probably the biggest time-saver the crafting, brewing, and smelting interfaces provide. It's also useful for quickly filling and emptying chests of stacks of items.
Double-clicking while holding an item in your hand and holding down shift will move every stack of the item you clicked on, except for the item you are holding in your hand.