Skip to content

Commit

Permalink
Updates for v1.23 release
Browse files Browse the repository at this point in the history
#44 - Incorrect editor appearance in some rare cases fixed
WebFileChooserPanel.java orientation change fixes
WebFileChooserPanel.java view focus loss on view type change fixed
Debug information is now stored within binaries
Bytes translation fix
  • Loading branch information
mgarin committed Oct 8, 2013
1 parent ba262a1 commit 3362e6c
Show file tree
Hide file tree
Showing 13 changed files with 422 additions and 267 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ You can find more information about the library on official site:<br>
http://weblookandfeel.com


Artifacts (v1.22)
Artifacts
----------
You can always find all WebLaF releases in the "releases" section:<br>
https://github.com/mgarin/weblaf/releases

Here are the direct links for the latest release:

1. [**weblaf-1.22.jar**](https://github.com/mgarin/weblaf/releases/download/v1.22/weblaf-1.22.jar) - library jar
2. [**weblaf-simple-1.22.jar**](https://github.com/mgarin/weblaf/releases/download/v1.22/weblaf-simple-1.22.jar) - library jar without dependencies
3. [**weblaf-src-1.22.zip**](https://github.com/mgarin/weblaf/releases/download/v1.22/weblaf-src-1.22.zip) - project sources zip
4. [**weblaf-demo-1.22.jar**](https://github.com/mgarin/weblaf/releases/download/v1.22/weblaf-demo-1.22.jar) - executable demo jar
5. [**weblaf-javadoc-1.22.zip**](https://github.com/mgarin/weblaf/releases/download/v1.22/weblaf-javadoc-1.22.zip) - JavaDoc zip
6. [**ninepatch-editor-1.22.jar**](https://github.com/mgarin/weblaf/releases/download/v1.22/ninepatch-editor-1.22.jar) - executable 9-patch editor jar
1. [**weblaf-1.23.jar**](https://github.com/mgarin/weblaf/releases/download/v1.23/weblaf-1.23.jar) - library jar
2. [**weblaf-simple-1.23.jar**](https://github.com/mgarin/weblaf/releases/download/v1.23/weblaf-simple-1.23.jar) - library jar without dependencies
3. [**weblaf-src-1.23.zip**](https://github.com/mgarin/weblaf/releases/download/v1.23/weblaf-src-1.23.zip) - project sources zip
4. [**weblaf-demo-1.23.jar**](https://github.com/mgarin/weblaf/releases/download/v1.23/weblaf-demo-1.23.jar) - executable demo jar
5. [**weblaf-javadoc-1.23.zip**](https://github.com/mgarin/weblaf/releases/download/v1.23/weblaf-javadoc-1.23.zip) - JavaDoc zip
6. [**ninepatch-editor-1.23.jar**](https://github.com/mgarin/weblaf/releases/download/v1.23/ninepatch-editor-1.23.jar) - executable 9-patch editor jar


Roadmap
Expand Down
15 changes: 14 additions & 1 deletion build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<!-- Compile classes -->
<target name="compile" depends="create.dist">
<javac includeantruntime="false" destdir="${dist.dir}" encoding="utf-8" source="1.6" target="1.6">
<javac debug="true" includeantruntime="false" destdir="${dist.dir}" encoding="utf-8" source="1.6" target="1.6">
<src path="${src.dir}" />
<classpath refid="java" />
</javac>
Expand Down Expand Up @@ -233,6 +233,19 @@

<!-- Assemble all artifacts -->
<target name="build.artifacts">
<antcall description="Cleanup artifacts" target="clean.artifacts" />
<antcall description="Build ${sources.zip.name}" target="build.sources.zip" />
<antcall description="Build ${library.jar.name}" target="build.weblaf.jar" />
<antcall description="Build ${library.simple.jar.name}" target="build.weblaf.simple.jar" />
<antcall description="Build ${demo.jar.name}" target="build.weblaf.demo.jar" />
<antcall description="Build ${npe.jar.name}" target="build.npe.jar" />
<antcall description="Build ${javadoc.name}" target="build.javadoc" />
<antcall description="Copy library version XML file" target="copy.version" />
<antcall description="Cleanup dist" target="clean.dist" />
</target>

<!-- Assemble release artifacts -->
<target name="build.release.artifacts">
<antcall description="Cleanup artifacts" target="clean.artifacts" />
<antcall description="Build ${sources.zip.name}" target="build.sources.zip" />
<antcall description="Build ${library.jar.name}" target="build.weblaf.jar" />
Expand Down
4 changes: 2 additions & 2 deletions build/version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Tue Oct 01 13:54:49 MSK 2013
build.number=23
#Tue Oct 08 16:53:21 MSK 2013
build.number=24
version.number=1
6 changes: 3 additions & 3 deletions src/com/alee/extended/list/WebCheckBoxListCellEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class WebCheckBoxListCellEditor extends AbstractListCellEditor<WebTextFie
* @return list cell editor created for the cell under specified index
*/
@Override
protected WebTextField createCellEditor ( JList list, int index, CheckBoxCellData value )
protected WebTextField createCellEditor ( final JList list, final int index, final CheckBoxCellData value )
{
final WebTextField field = WebTextField.createWebTextField ( true, WebListStyle.selectionRound, WebListStyle.selectionShadeWidth );
field.setDrawFocus ( false );
Expand All @@ -60,7 +60,7 @@ protected WebTextField createCellEditor ( JList list, int index, CheckBoxCellDat
* @return list cell editor bounds within the list
*/
@Override
protected Rectangle getEditorBounds ( JList list, int index, CheckBoxCellData value, Rectangle cellBounds )
protected Rectangle getEditorBounds ( final JList list, final int index, final CheckBoxCellData value, final Rectangle cellBounds )
{
final WebCheckBoxListElement element = ( ( WebCheckBoxList ) list ).getWebCheckBoxListCellRenderer ().getElement ( value );
final Rectangle ir = element.getWebUI ().getIconRect ();
Expand All @@ -77,7 +77,7 @@ protected Rectangle getEditorBounds ( JList list, int index, CheckBoxCellData va
* @return editor value
*/
@Override
public CheckBoxCellData getCellEditorValue ( JList list, int index, CheckBoxCellData oldValue )
public CheckBoxCellData getCellEditorValue ( final JList list, final int index, final CheckBoxCellData oldValue )
{
oldValue.setUserObject ( editor.getText () );
return oldValue;
Expand Down
40 changes: 20 additions & 20 deletions src/com/alee/extended/list/WebFileList.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public WebFileList ()
*
* @param directoryPath directory path
*/
public WebFileList ( String directoryPath )
public WebFileList ( final String directoryPath )
{
super ( new FileListModel ( directoryPath ) );
initializeDefaultSettings ();
Expand All @@ -100,7 +100,7 @@ public WebFileList ( String directoryPath )
*
* @param directory directory
*/
public WebFileList ( File directory )
public WebFileList ( final File directory )
{
super ( new FileListModel ( directory ) );
initializeDefaultSettings ();
Expand All @@ -111,7 +111,7 @@ public WebFileList ( File directory )
*
* @param data files array
*/
public WebFileList ( File[] data )
public WebFileList ( final File[] data )
{
super ( new FileListModel ( data ) );
initializeDefaultSettings ();
Expand All @@ -122,7 +122,7 @@ public WebFileList ( File[] data )
*
* @param data files list
*/
public WebFileList ( List<File> data )
public WebFileList ( final List<File> data )
{
super ( new FileListModel ( data ) );
initializeDefaultSettings ();
Expand Down Expand Up @@ -182,7 +182,7 @@ protected ListCellEditor createDefaultCellEditor ()
*
* @param preferredColumnCount new preferred visible column count
*/
public void setPreferredColumnCount ( int preferredColumnCount )
public void setPreferredColumnCount ( final int preferredColumnCount )
{
this.preferredColumnCount = preferredColumnCount;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ public int getPreferredRowCount ()
*
* @param preferredRowCount new preferred visible row count
*/
public void setPreferredRowCount ( int preferredRowCount )
public void setPreferredRowCount ( final int preferredRowCount )
{
this.preferredRowCount = preferredRowCount;
}
Expand All @@ -232,7 +232,7 @@ public boolean isGenerateThumbnails ()
*
* @param generateThumbnails whether to generate image file thumbnails or not
*/
public void setGenerateThumbnails ( boolean generateThumbnails )
public void setGenerateThumbnails ( final boolean generateThumbnails )
{
this.generateThumbnails = generateThumbnails;
}
Expand All @@ -252,7 +252,7 @@ public FileListViewType getFileListViewType ()
*
* @param fileListViewType new file view mode
*/
public void setFileListViewType ( FileListViewType fileListViewType )
public void setFileListViewType ( final FileListViewType fileListViewType )
{
this.fileListViewType = fileListViewType;
getWebFileListCellRenderer ().updateFilesView ();
Expand All @@ -273,7 +273,7 @@ public FileFilter getFileFilter ()
*
* @param fileFilter new file filter
*/
public void setFileFilter ( FileFilter fileFilter )
public void setFileFilter ( final FileFilter fileFilter )
{
this.fileFilter = fileFilter;
reloadFiles ();
Expand Down Expand Up @@ -304,7 +304,7 @@ public File getDisplayedDirectory ()
*
* @param file new displayed directory
*/
public void setDisplayedDirectory ( File file )
public void setDisplayedDirectory ( final File file )
{
// Stop cell editing
stopCellEditing ();
Expand Down Expand Up @@ -358,7 +358,7 @@ public File getSelectedFile ()
*
* @param file file to select
*/
public void setSelectedFile ( File file )
public void setSelectedFile ( final File file )
{
setSelectedFile ( file, true );
}
Expand All @@ -369,7 +369,7 @@ public void setSelectedFile ( File file )
* @param file file to select
* @param shouldScroll whether to scroll to selected file or not
*/
public void setSelectedFile ( File file, boolean shouldScroll )
public void setSelectedFile ( final File file, final boolean shouldScroll )
{
final FileElement element = getFileListModel ().getElement ( file );
if ( element != null )
Expand All @@ -387,7 +387,7 @@ public void setSelectedFile ( File file, boolean shouldScroll )
*
* @param files files to select
*/
public void setSelectedFiles ( Collection<File> files )
public void setSelectedFiles ( final Collection<File> files )
{
final List<FileElement> elements = new ArrayList<FileElement> ( files.size () );
for ( File file : files )
Expand Down Expand Up @@ -427,15 +427,15 @@ public WebScrollPane createScrollView ()
@Override
public Dimension getPreferredSize ()
{
Dimension ps = super.getPreferredSize ();
Dimension oneCell;
final Dimension ps = super.getPreferredSize ();
final Dimension oneCell;
if ( getModel ().getSize () > 0 )
{
oneCell = getCellBounds ( 0, 0 ).getSize ();
}
else
{
WebFileListCellRenderer fileListCellRenderer = getWebFileListCellRenderer ();
final WebFileListCellRenderer fileListCellRenderer = getWebFileListCellRenderer ();
if ( fileListCellRenderer != null )
{
oneCell = fileListCellRenderer.getPreferredSize ();
Expand All @@ -445,7 +445,7 @@ public Dimension getPreferredSize ()
oneCell = new Dimension ( 400, 300 );
}
}
Insets bi = getInsets ();
final Insets bi = getInsets ();
ps.width = oneCell.width * preferredColumnCount + bi.left + bi.right + WebScrollBarUI.LENGTH + 1;
ps.height = oneCell.height * preferredRowCount + bi.top + bi.bottom + 1;
return ps;
Expand All @@ -461,10 +461,10 @@ public Dimension getPreferredSize ()
@Override
public Dimension getPreferredSize ()
{
Dimension ps = super.getPreferredSize ();
final Dimension ps = super.getPreferredSize ();
if ( getModel ().getSize () > 0 )
{
Dimension oneCell = getCellBounds ( 0, 0 ).getSize ();
final Dimension oneCell = getCellBounds ( 0, 0 ).getSize ();
ps.width = oneCell.width * preferredColumnCount;
}
return ps;
Expand All @@ -475,7 +475,7 @@ public Dimension getPreferredSize ()
*
* @param element element to process
*/
public void repaint ( FileElement element )
public void repaint ( final FileElement element )
{
repaint ( getFileListModel ().indexOf ( element ) );
}
Expand Down
31 changes: 16 additions & 15 deletions src/com/alee/extended/list/WebFileListCellEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class WebFileListCellEditor extends AbstractListCellEditor<WebTextField,
/**
* Last saved selection.
*/
private Object savedSelection = null;
protected Object savedSelection = null;

/**
* {@inheritDoc}
Expand All @@ -51,7 +51,7 @@ protected void installStartEditActions ( final JList list )
keyAdapter = new KeyAdapter ()
{
@Override
public void keyReleased ( KeyEvent e )
public void keyReleased ( final KeyEvent e )
{
if ( Hotkey.F2.isTriggered ( e ) )
{
Expand All @@ -66,7 +66,7 @@ public void keyReleased ( KeyEvent e )
* {@inheritDoc}
*/
@Override
protected void uninstallStartEditActions ( JList list )
protected void uninstallStartEditActions ( final JList list )
{
list.removeKeyListener ( keyAdapter );
}
Expand All @@ -75,19 +75,19 @@ protected void uninstallStartEditActions ( JList list )
* {@inheritDoc}
*/
@Override
public boolean isCellEditable ( JList list, int index, FileElement value )
public boolean isCellEditable ( final JList list, final int index, final FileElement value )
{
File file = value != null ? value.getFile () : null;
final File file = value != null ? value.getFile () : null;
return file != null && FileUtils.isNameEditable ( file ) && super.isCellEditable ( list, index, value );
}

/**
* {@inheritDoc}
*/
@Override
protected WebTextField createCellEditor ( JList list, int index, FileElement value )
protected WebTextField createCellEditor ( final JList list, final int index, final FileElement value )
{
WebTextField editor = WebTextField.createWebTextField ( true, WebListStyle.selectionRound, WebListStyle.selectionShadeWidth );
final WebTextField editor = WebTextField.createWebTextField ( true, WebListStyle.selectionRound, WebListStyle.selectionShadeWidth );
editor.setDrawFocus ( false );
FileUtils.displayFileName ( editor, value.getFile () );

Expand All @@ -104,13 +104,13 @@ protected WebTextField createCellEditor ( JList list, int index, FileElement val
* {@inheritDoc}
*/
@Override
protected Rectangle getEditorBounds ( JList list, int index, FileElement value, Rectangle cellBounds )
protected Rectangle getEditorBounds ( final JList list, final int index, final FileElement value, final Rectangle cellBounds )
{
if ( list instanceof WebFileList )
{
WebFileListCellRenderer cellRenderer = ( ( WebFileList ) list ).getWebFileListCellRenderer ();
Rectangle dpBounds = cellRenderer.getDescriptionPanel ().getBounds ();
Dimension size = editor.getPreferredSize ();
final WebFileListCellRenderer cellRenderer = ( ( WebFileList ) list ).getWebFileListCellRenderer ();
final Rectangle dpBounds = cellRenderer.getDescriptionBounds ();
final Dimension size = editor.getPreferredSize ();
return new Rectangle ( dpBounds.x, dpBounds.y + dpBounds.height / 2 - size.height / 2, dpBounds.width, size.height );
}
else
Expand All @@ -123,13 +123,13 @@ protected Rectangle getEditorBounds ( JList list, int index, FileElement value,
* {@inheritDoc}
*/
@Override
public FileElement getCellEditorValue ( JList list, int index, FileElement oldValue )
public FileElement getCellEditorValue ( final JList list, final int index, final FileElement oldValue )
{
// Saving initial selection
savedSelection = list.getSelectedValue ();

// Finishing edit
File renamed = new File ( oldValue.getFile ().getParent (), editor.getText () );
final File renamed = new File ( oldValue.getFile ().getParent (), editor.getText () );
if ( oldValue.getFile ().renameTo ( renamed ) )
{
if ( savedSelection == oldValue )
Expand All @@ -148,12 +148,13 @@ public FileElement getCellEditorValue ( JList list, int index, FileElement oldVa
* {@inheritDoc}
*/
@Override
public boolean updateListModel ( JList list, int index, FileElement oldValue, FileElement newValue, boolean updateSelection )
public boolean updateListModel ( final JList list, final int index, final FileElement oldValue, final FileElement newValue,
final boolean updateSelection )
{
// Updating model
if ( list.getModel () instanceof FileListModel )
{
FileListModel model = ( FileListModel ) list.getModel ();
final FileListModel model = ( FileListModel ) list.getModel ();

// If name was actually changed
if ( !oldValue.getFile ().getAbsolutePath ().equals ( newValue.getFile ().getAbsolutePath () ) )
Expand Down
Loading

0 comments on commit 3362e6c

Please sign in to comment.