Java Code Examples for com.alee.laf.WebLookAndFeel#setOrientation()
The following examples show how to use
com.alee.laf.WebLookAndFeel#setOrientation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NinePatchEditor.java From weblaf with GNU General Public License v3.0 | 6 votes |
public NinePatchEditor () { super (); ninePatchImage = null; ninePatchIcon = null; WebLookAndFeel.setOrientation ( this ); setOpaque ( false ); setFocusable ( true ); setLayout ( new TableLayout ( new double[][]{ { RULER_LENGTH, TableLayout.PREFERRED, TableLayout.FILL }, { RULER_LENGTH, TableLayout.PREFERRED, TableLayout.FILL } } ) ); setFont ( new JLabel ().getFont ().deriveFont ( 10f ) ); view = new WebScrollPane ( StyleId.scrollpaneTransparentHovering, this ); final NinePatchEditorMouseAdapter mouseAdapter = new NinePatchEditorMouseAdapter (); addMouseListener ( mouseAdapter ); addMouseMotionListener ( mouseAdapter ); addMouseWheelListener ( mouseAdapter ); }
Example 2
Source File: AbstractPainter.java From weblaf with GNU General Public License v3.0 | 5 votes |
/** * Updates component orientation based on global orientation. */ protected void updateOrientation () { if ( isSettingsUpdateAllowed () ) { WebLookAndFeel.setOrientation ( component ); } }
Example 3
Source File: WebColorPicker.java From weblaf with GNU General Public License v3.0 | 5 votes |
public WebColorPicker () { super (); WebLookAndFeel.setOrientation ( this ); setPreferredSize ( new Dimension ( 44, 44 ) ); initListeners (); }
Example 4
Source File: ImageTransition.java From weblaf with GNU General Public License v3.0 | 5 votes |
public ImageTransition ( final BufferedImage currentImage, final BufferedImage otherImage ) { super (); this.currentImage = currentImage; this.otherImage = otherImage; WebLookAndFeel.setOrientation ( this ); setOpaque ( false ); }
Example 5
Source File: WebWindow.java From weblaf with GNU General Public License v3.0 | 5 votes |
/** * Additional initializtion of WebWindow settings. * * @param id initial {@link StyleId} */ protected void initialize ( @NotNull final StyleId id ) { // Default window initialization setLocale ( JComponent.getDefaultLocale () ); setRootPane ( createRootPane () ); setRootPaneCheckingEnabled ( true ); ProprietaryUtils.checkAndSetPolicy ( this ); // Updating base settings setFocusable ( true ); setFocusableWindowState ( true ); WebLookAndFeel.setOrientation ( this ); // Applying style setStyleId ( id ); // Adding focus tracker for this window // It is stored into a separate field to avoid its disposal from memory focusTracker = new DefaultFocusTracker ( getRootPane (), true ) { @Override public boolean isEnabled () { return closeOnFocusLoss && super.isEnabled (); } @Override public void focusChanged ( final boolean focused ) { if ( isEnabled () && !focused ) { // Simply disposing window dispose (); } } }; FocusManager.addFocusTracker ( getRootPane (), focusTracker ); }
Example 6
Source File: WhiteSpace.java From weblaf with GNU General Public License v3.0 | 5 votes |
/** * Constructs new spacer. * * @param spacing space amount * @param orientation space orientation */ public WhiteSpace ( final int spacing, final int orientation ) { super (); WebLookAndFeel.setOrientation ( this ); setSpacing ( spacing ); setOrientation ( orientation ); }
Example 7
Source File: WebDecoratedImage.java From weblaf with GNU General Public License v3.0 | 4 votes |
public WebDecoratedImage ( @NotNull final ImageIcon icon ) { super (); WebLookAndFeel.setOrientation ( this ); setIcon ( icon ); }
Example 8
Source File: LineColorChooser.java From weblaf with GNU General Public License v3.0 | 4 votes |
public LinePalette () { super (); WebLookAndFeel.setOrientation ( this ); }
Example 9
Source File: WebDialog.java From weblaf with GNU General Public License v3.0 | 4 votes |
/** * Additional initialization of WebDialog settings. * * @param owner {@link java.awt.Window} from which the dialog is displayed or {@code null} if this dialog has no owner * @param id initial {@link StyleId} * @param title dialog title */ protected void initialize ( final Window owner, final StyleId id, final String title ) { // Slightly modified default behavior for parentless dialogs if ( owner == ProprietaryUtils.getSharedOwnerFrame () ) { addWindowListener ( ProprietaryUtils.getSharedOwnerFrameShutdownListener () ); } // Default dialog initialization enableEvents ( AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK ); setLocale ( JComponent.getDefaultLocale () ); setRootPane ( createRootPane () ); setRootPaneCheckingEnabled ( true ); ProprietaryUtils.checkAndSetPolicy ( this ); // Additional settings WebLookAndFeel.setOrientation ( this ); setDefaultCloseOperation ( DISPOSE_ON_CLOSE ); // Applying style setStyleId ( id ); // Language updater if ( title != null ) { UILanguageManager.registerInitialLanguage ( this, title ); } // Adding focus tracker for this dialog // It is stored into a separate field to avoid its disposal from memory focusTracker = new DefaultFocusTracker ( getRootPane (), true ) { @Override public boolean isEnabled () { return closeOnFocusLoss && super.isEnabled (); } @Override public void focusChanged ( final boolean focused ) { if ( isEnabled () && !focused ) { // Making sure dialog can do something to prevent the close processWindowEvent ( new WindowEvent ( WebDialog.this, WindowEvent.WINDOW_CLOSING ) ); } } }; FocusManager.addFocusTracker ( getRootPane (), focusTracker ); }
Example 10
Source File: WebFrame.java From weblaf with GNU General Public License v3.0 | 4 votes |
/** * Additional initialization of WebFrame settings. * * @param id initial {@link StyleId} * @param title frame title */ protected void initialize ( final StyleId id, final String title ) { // Default frame initialization enableEvents ( AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK ); setLocale ( JComponent.getDefaultLocale () ); setRootPane ( createRootPane () ); setRootPaneCheckingEnabled ( true ); ProprietaryUtils.checkAndSetPolicy ( this ); // Additional settings WebLookAndFeel.setOrientation ( this ); // Applying style setStyleId ( id ); // Language updater if ( title != null ) { UILanguageManager.registerInitialLanguage ( this, title ); } // Adding focus tracker for this frame // It is stored into a separate field to avoid its disposal from memory focusTracker = new DefaultFocusTracker ( getRootPane (), true ) { @Override public boolean isEnabled () { return closeOnFocusLoss && super.isEnabled (); } @Override public void focusChanged ( final boolean focused ) { if ( isEnabled () && !focused ) { // Making sure frame can do something to prevent the close processWindowEvent ( new WindowEvent ( WebFrame.this, WindowEvent.WINDOW_CLOSING ) ); } } }; FocusManager.addFocusTracker ( getRootPane (), focusTracker ); }